%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% FILE:  main.tex
%
% ``Lectures on Modular Forms and Hecke Operators''
%                  by Ken Ribet and William Stein
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\documentclass{report}
\usepackage{hyperref}

\bibliographystyle{amsalpha}


\usepackage{svsing2e}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsopn}
\usepackage{amsthm}
\usepackage{makeidx}
\usepackage{psfrag}
\usepackage{graphicx}
\usepackage[all]{xy}

\include{macros}
%\renewcommand{\edit}[1]{}

\makeindex

\author{Kenneth\thinspace{}A. Ribet\and William\thinspace{}A. Stein}
\title{Lectures on Modular Forms and Hecke Operators}

%\renewcommand{\baselinestretch}{2}    % for proof reading purposes.

\begin{document}
%\CompileMatrices % xymatrix
%\UseTips % xymatrix option

\maketitle
\tableofcontents
\newpage


\pagenumbering{arabic}

\chapter*{Preface}
\addcontentsline{toc}{section}{{\bf Preface}}

This book began when the second author typed notes for the first
author's 1996 Berkeley course on modular forms with a view toward
explaining some of the key ideas in Wiles's celebrated proof of
Fermat's Last Theorem.  The second author then expanded and rewrote
the notes while teaching a course at Harvard in 2003 on modular
abelian varieties.

The intended audience of this book is advanced graduate students and
mathematical researchers.  This book is more advanced than
\cite{lozano, stein:modform, diamond-shurman}, and at a relatively
similar level to \cite{diamond-im}, though with more details. It
should be substantially more accessible than a typical research paper
in the area.

Some things about how this book is (or will be!) fully ``modern'' in that it
takes into account:
\begin{itemize}
\item The full modularity theorem.
\item The proof of the full Serre conjecture
\item Computational techniques (algorithms, Sage)
\end{itemize}


\subsection*{Notation}

$\isom$ an isomorphism

$\ncisom$ a noncanonical isomorphism



\subsection*{Acknowledgement}

Joe Wetherell wrote the first version of Section~\ref{sec:modprep}.


\comment{The authors would like to thank those who attended the
  courses.  Berkeley -- Amod Agashe, Matt Baker, Jim Borger, Kevin
  Buzzard, Bruce Caskel, Robert Coleman, Jan\'{o}s Csirik, Annette
  Huber, David Jones, David Kohel, Lo\"\i{}c Merel, David Moulton,
  Andrew Ogg, Arthur Ogus, Jessica Polito, Saul Schleimer, Lawren
  Smithline, Shuzo Takahashi, Wayne Whitney, and Hui Zhu.  Harvard --
  Dimitar Jetchev, Grigor Grigorov, and -- how can I figure this out??}


\subsection*{Contact}

\vspace{5ex}
\noindent
Kenneth A. Ribet ({\sf ribet@math.berkeley.edu})\\
William A. Stein ({\sf wstein@gmail.com})

\chapter{The Main Objects}   

\section{Torsion points on elliptic curves}

\index{torsion points} \index{points!torsion} The main geometric
objects that we will study in this book are elliptic curves, which are
curves of genus one equipped with a distinguished point.  More
generally, we consider certain algebraic curves of larger genus called
modular curves, which in turn give rise via the Jacobian construction
to higher-dimensional abelian varieties from which we will obtain
representations of the Galois group $\Gal(\Qbar/\Q)$ of the rational
numbers.

It is convenient to view the group of complex points $E(\C)$ on an
elliptic curve~$E$ over the complex numbers~$\C$ as a quotient $\C/L$.
Here 
\begin{equation*}
L = \left\{\int_{\gamma} \omega 
            \,\,\, :\,\, \, \gamma\in H_1(E(\C),\Z)\right\}
\end{equation*} 
is a lattice attached to a nonzero
holomorphic differential~$\omega$ on~$E$, and
the homology $H_1(E(\C),\Z)\ncisom \Z\cross\Z$ is the abelian group of 
smooth closed paths on $E(\C)$ modulo the homology relations.

Viewing~$E$ as $\C/L$ immediately gives us information about the
structure of the group of torsion points on~$E$, which we 
exploit in the next section to construct two-dimensional
representations of $\Gal(\Qbar/\Q)$.

\subsection{The Tate module}
 In the 1940s, Andre Weil studied the analogous situation for elliptic
curves defined over a finite field~$k$. He desperately wanted to find
an algebraic way to describe the above relationship between elliptic
curves and lattices.  He found an algebraic definition of
$L/nL$, when~$n$ is prime to the characteristic of~$k$.

Let
$$
  E[n]:=\{P\in E(\overline{k}) : nP = 0\}.
$$  
When $E$ is defined over $\C$, 
$$
  E[n]= \left(\frac{1}{n} L\right) / L  
   \isom L / n L \ncisom (\Z/n\Z)\cross(\Z/n\Z),
$$
so $E[n]$ is a purely algebraic object canonically isomorphic
to $L/nL$.

Now suppose $E$ is defined over an arbitrary field $k$.
For any prime~$\ell$, let
\begin{eqnarray*}
  E[\ell^\infty]&:=&
  \{P\in E(\overline{k}) : \ell^{\nu}P = 0, \text{ some } 
     \nu \geq 1\}\\ 
   &=& \bigcup_{\nu=1}^{\infty} E[\ell^{\nu}] 
        = \varinjlim E[\ell^{\nu}].
\end{eqnarray*}
In an analogous way, Tate constructed a rank~$2$ free
$\Zl$-module 
$$
  T_{\ell}(E):=\varprojlim E[\ell^{\nu}],
$$
where the map $E[\ell^{\nu}]\into E[\ell^{\nu-1}]$ 
is multiplication by~$\ell$.  
The $\Z/\ell^{\nu}\Z$-module structure of $E[\ell^{\nu}]$ is compatible
with the maps $E[\ell^{\nu}]\xrightarrow{\ell} E[\ell^{\nu-1}]$
(see, e.g., \cite[III.7]{silverman:aec}).
If $\ell$ is coprime to the characteristic of the base field $k$,
then $T_{\ell}(E)$ is free of rank~$2$ over $\Zl$,
and 
$$
 V_{\ell}(E):=T_{\ell}(E)\tensor\Q_{\ell}
$$ 
is a 2-dimensional vector space over $\Q_{\ell}$.  
%This is our first nontrivial example of $\ell$-adic \'{e}tale 
%cohomology. 

\section{Galois representations}
Number theory is largely concerned with the
Galois group $\Gal(\Qbar/\Q)$, which is often studied
by considering continuous linear representations
$$
\rho:\Gal(\Qbar/\Q)\ra \GL_n(K)
$$
where~$K$ is a field and~$n$ 
is a positive integer, usually $2$ in this book.
Artin, Shimura, Taniyama, and Tate pioneered the study of such representations.

Let~$E$ be an elliptic curve defined over the rational numbers $\Q$.  
Then $\Gal(\overline{\Q}/\Q)$ acts on the set $E[n]$,
and this action respects the group operations, so 
we obtain a representation
\begin{equation*}
\rho: \Gal(\Qbar/\Q) \into \Aut(E[n])\ncisom \GL_2(\Z/n\Z).
\end{equation*}
Let~$K$ be the field cut out by the $\ker(\rho)$, i.e., the
fixed field of $\ker(\rho)$.  
Then~$K$ is a finite Galois extension of $\Q$.
Since 
$$
  \Gal(K/\Q)\isom \Gal(\Qbar/\Q)/\ker\rho \isom 
   \Im \rho \hra \GL_2(\Z/n\Z)
$$ 
we obtain, in this way, subgroups of $\GL_2(\Z/n\Z)$ as Galois groups. 

Shimura\index{Shimura} showed  
that if we start with the elliptic curve~$E$ 
defined by the equation $y^2+y = x^3-x^2$
then for ``most''~$n$ the image of $\rho$ is all of $\GL_2(\Z/n\Z)$.
More generally, the image is ``most'' of $\GL_2(\Z/n\Z)$ when~$E$
does not have complex multiplication.  (We say~$E$ has
\index{complex multiplication}
{\em complex multiplication} if its endomorphism ring over~$\C$
is strictly larger than~$\Z$.)

\section{Modular forms}\label{sec:modformintro}
Many spectacular theorems and deep conjectures link Galois
representations with modular forms.  Modular forms are extremely
symmetric analytic objects, which we will first view as holomorphic
functions on the complex upper half plane that behave well with
respect to certain groups of transformations.

\index{cusp forms}
Let $\SL_2(\Z)$ be the group of $2\times 2$ integer matrices
with determinant~$1$.
For any positive integer~$N$, consider the subgroup
$$\Gamma_1(N):=\left\{ 
\mtwo{a}{b}{c}{d}
 \in \SL_2(\Z) \, :\, 
a\equiv d\equiv 1,\,\, c\equiv 0 \!\!\pmod{N}  \right\}
$$
of matrices in $\SL_2(\Z)$ that are of the form
$\mtwo{1}{*}{0}{1}$ when reduced modulo~$N$.

The space $S_k(N)$ of {\em cusp forms} of weight~$k$ and 
level~$N$ for $\Gamma_1(N)$ consists of
all holomorphic functions $f(z)$ on the complex upper half plane
$$
  \h=\{z\in\C : \Im(z)>0\}
$$
that vanish at the cusps (see below) and satisfy the equation
\begin{equation*}
f\left(\frac{az+b}{cz+d}\right)=(cz+d)^k f(z) \text{ for all }
\mtwo{a}{b}{c}{d}
\in \Gamma_1(N)\text{ and }z \in \h.
\end{equation*}
Thus $f(z+1)=f(z)$, so~$f$ determines
a function~$F$ of $q(z)=e^{2\pi i z}$ such that $F(q)=f(z)$.  
Viewing~$F$ as a function on $\{z:0<|z|<1\}$, the condition that $f(z)$
is holomorphic and
vanishes at infinity is that $F(z)$ extends to a holomorphic
function on $\{z:|z|<1\}$ and $F(0)=0$. 
In this case,~$f$ is determined by its {\em Fourier expansion}
$$
  f(q)=\sum_{n=1}^{\infty}a_n q^n.
$$
It is also useful to consider the space $M_k(N)$ 
of {\em modular forms} of level~$N$, which is defined in the
same way as $S_k(N)$, except that the condition that $F(0)=0$
is relaxed, and we require only that $F$ extends to a holomorphic
function at~$0$ (and there is a similar condition at the
cusps other than $\infty$).

The spaces $M_k(N)$ and $S_k(N)$ 
are finite dimensional.
\begin{example}
We compute $\dim(M_5(30))$ and $\dim(S_5(30))$ in Sage:
\begin{lstlisting}
sage: ModularForms(Gamma1(30),5).dimension()
112
sage: CuspForms(Gamma1(30),5).dimension()
80
\end{lstlisting}
\end{example}


For example, 
the space $S_{12}(1)$ has dimension one and 
is spanned by the famous cusp form
\begin{equation*}
\Delta = q\prod_{n=1}^{\infty}(1-q^n)^{24} = \sum_{n=1}^{\infty} \tau(n) q^n.
\end{equation*}
The coefficients $\tau(n)$ define the 
{\em Ramanujan $\tau$-function}\index{Ramanujan!$\tau$-function}\index{$\tau$-function}.
A non-obvious fact is that~$\tau$ is multiplicative and for 
every prime $p$ and positive integer $\nu$, we have
$$
\tau(p^{\nu+1})=\tau(p)\tau(p^{\nu})-p^{11}\tau(p^{\nu-1}).
$$

\begin{example}
We draw a plot of the $\Delta$ function (using 20 terms of the $q$-expansion) on the upper half plane.  Notice the symmetry $\Delta(z)=\Delta(z+1)$:
\begin{center}
% D = delta_qexp(20)(exp(2*pi*i*x))
% complex_plot(D, (-2,2), (0,.75), plot_points=200).save('deltaplot.pdf')
\includegraphics[width=\textwidth]{graphics/deltaplot}
\end{center}
\begin{lstlisting}
sage: z = var('z'); q = exp(2*pi*i*z)
sage: D = delta_qexp(20)(q)
sage: complex_plot(D, (-2,2), (0,.75), plot_points=200)
\end{lstlisting}
\end{example}

\section{Hecke operators}\label{sec:hecke1}
Mordell defined
operators $T_n$, $n\geq 1$, on $S_k(N)$ which are called
{\em Hecke operators}\index{Hecke operator}. 
These proved very fruitful. The set of such
operators forms a commuting family of endomorphisms and
is hence ``almost'' simultaneously diagonalizable. 
%The precise meaning
%of ``almost'' and the actual structure of the Hecke algebra 
%$\T=\Q[T_1,T_2,\ldots]$ 
%will be studied in greater detail in\edit{Where? Reference.}.

Often
%\edit{Is $N$ square-free enough for the $\Gamma_1(N)$ case?  Need
%  to consult Coleman-Edixhoven.}  
there is a basis $f_1,\ldots,f_r$ of
$S_k(N)$ such that each $f=f_i=\sum_{n=1}^{\infty} a_n q^n $ is a
simultaneous eigenvector for all the Hecke operators $T_n$ 
normalized so that $T_n f = a_n f$, i.e., so the
coefficient of $q$ is $1$.  In this situation, the eigenvalues $a_n$
are necessarily algebraic integers and the field 
$$K = K_f = \Q(\ldots,a_n,\ldots)$$ 
generated by all $a_n$ is finite over~$\Q$.
%being roots of the characteristic polynomial of $T_n$, 
%and much less trivially, 

The $a_n$ exhibit remarkable properties.
For example,  
 $$\tau(n) \equiv \sum_{d|n}d^{11} \pmod {691}.$$
 
We can check this congruence for $n=30$ in Sage as follows:
\begin{lstlisting}
sage: n=30; t = delta_qexp(n+1)[n]; t
-29211840
sage: sigma(n,11)
17723450167663752
sage: (sigma(n,11) - t)%691
0
\end{lstlisting}

The key to studying and interpreting the~$a_n$
is to understand the deep connections between 
Galois representations and modular forms
that were discovered by 
Serre\index{Serre}, Shimura\index{Shimura}, 
Eichler\index{Eichler} and Deligne\index{Deligne}.

\chapter{Modular Representations and Algebraic Curves}

\section{Modular forms and Arithmetic}\label{sec:modformarith}
Consider a cusp form
      $$f=\sum_{n=1}^{\infty}a_n q^n\in S_k(N)$$ 
which is an eigenform for all of the Hecke operators $T_p$, and
assume $f$ is normalized
so $a_1 = 1$.  Then the  the $L$-function 
 $$L(f,s)=\sum_{n=1}^{\infty} \frac{a_n}{n^s}.$$ 
Hecke proved that $L(f,s)$ extends uniquely to a holomorphic function
on $\C$ that satisfies a functional equation.  He did this
using the (Mellin) integral transform 
$$
\int_{0}^{\infty} f(it)t^s \frac{dt}{t} = N^{s/2} (2\pi)^{-s} \Gamma(s) L(f,s) = \Lambda(f,s).
$$
There is a complex number $c$ with absolute value $1$
such that the function $\Lambda(f,s)$ satisfies the functional equation
$$
 \Lambda(f,s) = c \Lambda(\tilde{f}, k-s),
$$
where $\tilde{f} = \sum_{n=1}^{\infty} \overline{a}_n q^n \in S_k(N)$
is obtained from $f$ by complex conjugation of coefficients
(see Section~\ref{sec:conjugation}).

Let $K=\bQ(a_1,a_2,\ldots)$ be the number field generated by the
Fourier coefficients of $f$. One can show that the $a_n$ are algebraic
integers and that $K$ is a number field.  When $k=2$,
Shimura\index{Shimura} associated to $f$ an abelian variety $A_f$ over
$\bQ$ of dimension $[K:\bQ]$ on which $\bZ[a_1,a_2,\ldots]$ acts
\cite[Theorem 7.14]{shimura:intro}.

\begin{example}[Modular Elliptic Curves]
 Suppose now that all coefficients $a_n$ of $f$ lie in $\bQ$ so that
$[K:\bQ]=1$ and hence $A_f$ is a one dimensional abelian variety,
i.e., an elliptic curve.  An elliptic curve isogenous to one arising
via this construction is called {\em modular}.
\end{example}

\begin{defn}
Elliptic curves $E_1$ and $E_2$ are {\em isogenous} if there is
a morphism $E_1\into E_2$ of algebraic groups, having
finite kernel.
\end{defn}

The following theorem motivates much of the theory discussed in this
course.  It is a theorem of Breuil, Conrad, Diamond, Taylor, and Wiles
(see \cite{breuil-conrad-diamond-taylor}).

\begin{theorem}[Modularity Theorem]       
Every elliptic curve over $\bQ$ is modular, 
that is, isogenous to a curve constructed in the above way. 
\end{theorem}

For $k\geq 2$ Serre\index{Serre} and Deligne discovered a way to associate 
to~$f$ a family of $\ell$-adic representations. Let $\ell$ be a prime number 
and $K=\Q(a_1,a_2,\ldots)$ be as above. Then it is well known that 
  $$K\tensor_{\bQ} \bQ_{\ell}\isom \prod_{\lambda|\ell}K_{\lambda}.$$ 
%hmwk

One can associate to $f$ a representation
\begin{equation*}
\rholf:G=\Gal(\overline{\bQ}/\bQ)
\rightarrow\GL_2(K\tensor_{\bQ}\bQ_{\ell})
\end{equation*}
unramified at all primes $p\nd \ell N$.  Let $\Zbar$ be the ring of
all algebraic integers.  For $\rholf$ to be unramified at $p$ we mean
that for all primes $P$ of $\Zbar$ lying over $p$, the inertia
subgroup of the decomposition group at $P$ is contained in the kernel
of $\rholf$. The decomposition group $D_P$ at $P$ is the set of those
$g\in G$ which fix $P$. Let $\overline{k}$ be the residue field
$\Zbar/P$ and $k=\F_p$.  Then the inertia group $I_P$ is the kernel of
the surjective map $D_P\rightarrow \Gal(\overline{k}/k)$.

Now $I_P\subset D_P \subset \Gal(\overline{\bQ}/\bQ)$ and $D_P / I_P$
is pro-cyclic (being isomorphic to the Galois group
$\Gal(\overline{k}/k)$), so it is generated by a Frobenious
automorphism $\Frob_p$ lying over $p$.  One has
\begin{align*}
\tr(\rholf(\Frob_p))& = a_p\in K \subset K\tensor \bQ_{\ell}\\
&\text{and}\\
\det(\rholf) &= \chi_{\ell}^{k-1}\varepsilon
\end{align*}
where, as explained below, $\chi_{\ell}$ is the $\ell$th cyclotomic
character and $\varepsilon$ is the Dirichlet character associated to
$f$.

There is an incredible amount of ``abuse of notation'' packed into the
above statement.  Let $M=\Qbar^{\ker(\rho_{\ell,f})}$ be the field
fixed by the kernel of $\rho_{\ell,f}$.  Then the Frobenius element
$\Frob_P$ (note $P$ not $p$) is well defined as an element of
$\Gal(M/\Q)$, and the element $\Frob_p$ is then only well defined up
to conjugacy.  But this works out since $\rholf$ is well-defined on
$\Gal(M/\Q)$ (it kills $\Gal(\overline{\bQ}/M)$) and trace is
well-defined on conjugacy classes ($\tr(AB)=\tr(BA)$ so
$\tr(ABA^{-1})=Tr(B)$).
                                               

\section{Characters}
Let $f\in S_k(N)$ be an eigenform for all Hecke operators. Then for all 
$\bigl(\begin{smallmatrix} a&b\\c&d\end{smallmatrix}\bigr)
\in \sltwoz$ with $c\equiv 0 \mod{N}$ we have
\begin{equation*}
f\left(\frac{az+b}{cz+d}\right) = (cz+d)^k \varepsilon(d) f(z),
\end{equation*}
where $\varepsilon:(\bZ/N\bZ)^*\rightarrow \bC^*$
is a Dirichlet character mod $N$. If $f$ is also normalized so that
$a_1=1$, as in Section~\ref{sec:hecke1},
then $\varepsilon$ actually takes values in $K^*$.
%hmwk

Let $G=\Gal(\Qbar/\Q)$, 
and let $\varphi_N$ be the mod $N$ cyclotomic character so that
$\varphi_N: G \rightarrow (\bZ/N\bZ)^*$ takes $g\in G$ to
the automorphism induced by $g$ on the $N$th cyclotomic
extension $\bQ(\Mu_N)$ of $\bQ$ (where we identify
$\Gal(\bQ(\Mu_N)/\bQ)$ with $(\bZ/N\bZ)^*$). 
Then what we called $\varepsilon$ above in the formula 
$\det(\rho_{\ell})=\chi_{\ell}^{k-1}\varepsilon$
is really the composition
\begin{equation*}
G\xrightarrow{\varphi_N}(\bZ/N\bZ)^*\xrightarrow{\varepsilon} \bC^*.
\end{equation*} 

For each positive integer $\nu$ we consider the $\ell^{\nu}$th
cyclotomic character on $G$, 
\begin{equation*}
\varphi_{\ell^{\nu}}:G\rightarrow (\bZ/\ell^{\nu}\bZ)^*.
\end{equation*}
Putting these together gives the $\ell$-adic cyclotomic character
$$\chi_{\ell}:G\into\bZ_{\ell}^{*}.$$

\section{Parity conditions}

Let $c\in\Gal(\overline{\bQ}/\bQ)$ be complex conjugation.
Then $\varphi_N(c)=-1$ so $\varepsilon(c) = \varepsilon(-1)$ and
$\chi_{\ell}^{k-1}(c) = (-1)^{k-1}$.  
Letting
$\bigl(\begin{smallmatrix} a&b\\c'&d\end{smallmatrix}\bigr)
=
\bigl(\begin{smallmatrix} -1&\hfill 0\\\hfill 0&-1\end{smallmatrix}\bigr)$,
for $f\in S_k(N)$, we have
$$f(z) = (-1)^k\varepsilon(-1)f(z),$$ 
so $(-1)^k\varepsilon(-1) = 1$.
Thus
$$\det(\rholf(c)) = \varepsilon(-1)(-1)^{k-1} = -1.$$
We say a representation is {\em odd} if the determinant of complex
conjugation is $-1$.  Thus the representation $\rholf$ is odd.

\begin{remark}[Vague Question] How can one recognize representations
  like $\rholf$ ``in nature''? Fontaine and Mazur\index{Mazur} have
  made relevant conjectures.  The modularity theorem can be
  reformulated by saying that for any representation $\rho_{\ell,E}$
  coming from an elliptic curve $E$ there is an $f$ so that
  $\rho_{\ell,E}\isom \rholf$.
\end{remark}

\section{Conjectures of Serre (mod $\ell$ version)}
\index{Serre}
Suppose $f$ is a modular form, $\ell\in\Z$  prime,
$\lambda$ a prime lying over $\ell$, and the representation
$$\rho_{\lambda,f}:G\rightarrow \GL_2(K_{\lambda})$$ 
(constructed by Serre-Deligne) is irreducible. 
Then $\rho_{\lambda,f}$ is conjugate to a representation
with image in $\GL_2(\cO_{\lambda})$, where $\cO_{\lambda}$
is the ring of integers of $K_{\lambda}$ (see Section~\ref{sec:modprep} below). 
Reducing mod $\lambda$ gives a representation
$$\overline{\rho}_{\lambda,f}:G\rightarrow\GL_2(\bF_{\lambda})$$
which has a well-defined trace and det, i.e., the det and trace do not
depend on the choice of conjugate representation used to obtain the
reduced representation.  One knows from representation theory (the
Brauer-Nesbitt theorem -- see \cite{curtis-reiner}) that if such a
representation is semisimple then it is completely determined by its
trace and det (more precisely, it is determined by the characteristic
polynomials of all of its elements).  Thus if
$\overline{\rho}_{\lambda,f}$ is irreducible (and hence semisimple)
then it is unique in the sense that it does not depend on the choice
of conjugate.

\section{General remarks on mod $p$ Galois representations}\label{sec:modprep}
\label{sec:wetherell}
\index{Galois representations}
%% By Joe Wetherell
%\edit{This section was written by Joseph Loebach Wetherell.}
First, what are semisimple and irreducible representations?  Remember
that a representation $\rho$ is a map from a group $G$ to the endomorphisms of
some vector space $W$ (or a free module $M$ if we are working over a ring
instead of a field, but let's not worry about that for now).  A subspace $W'$
of $W$ is said to be invariant under $\rho$ if $\rho$ takes $W'$ back into itself.
(The point is that if $W'$ is invariant, then $\rho$ induces representations on
both $W'$ and $W/W'$.)  An irreducible representation is one whose only
invariant subspaces are $\{0\}$ and $W$.  A semisimple representation is one
where for every invariant subspace $W'$ there is a complementary invariant
subspace $W''$ -- that is, you can write $\rho$ as the direct sum of $\rho|_{W'}$ 
and $\rho|_{W''}$.

Another way to say this is that if $W'$ is an invariant subspace then we get a
short exact sequence $$0\into\rho|_{W/W'}\into\rho\into\rho|_{W'}\into 0.$$  
Furthermore $\rho$ is
semisimple if and only if every such sequence splits.

Note that irreducible representations are semisimple.  As mentioned
above, two-dimensional semisimple Galois representations are uniquely
determined (up to isomorphism class) by their trace and determinant.
In the case we are considering, $G = \GalQ$ is compact, so the image
of any Galois representation $\rho$ into $\GL_2(K_{\lambda})$ is
compact.  Thus we can conjugate it into $\GL_2(\cO_{\lambda})$.
Irreducibility is not needed for this.

Now that we have a representation into $\GL_2(\cO_{\lambda})$, we can
reduce to get a representation $\overline{\rho}$ to
$\GL_2(\bF_{\lambda})$.  This reduced representation is not uniquely
determined by $\rho$, since we made a choice of basis (via
conjugation) so that $\rho$ would have image in
$\GL_2(\cO_{\lambda})$, and a different choice may lead to a
non-isomorphic representation mod $\lambda$.  However, the trace and
determinant of a matrix are invariant under conjugation, so the trace
and determinant of the reduced representation $\overline{\rho}$ are
uniquely determined by $\rho$.

So we know the trace and determinant of the reduced representation.  If we
also knew that it was semisimple, then we would know its isomorphism class,
and we would be done.  So we would be happy if the reduced representation is
irreducible.  And in fact, it is easy to see that if the reduced
representation is irreducible, then $\rho$ must also be irreducible.  
Most $\rho$ of interest to us {\em in this book} will be irreducible.
Unfortunately, the opposite implication does not hold:
$\rho$ irreducible need not imply that $\overline{\rho}$ is irreducible.

\section{Serre's conjecture}
\index{Serre} Serre has made the following conjecture which is {\em
  now a theorem} (see \cite{khare-wintenberger:serre1}).
\begin{conjecture}[Serre]
All 2-dimensional irreducible representation of 
$G$ over a finite field which are odd, i.e., $det(\sigma(c))=-1$, $c$
complex conjugation, are of the form $\overline{\rho}_{\lambda,f}$
for some representation $\rho_{\lambda,f}$ constructed as above. 
\end{conjecture}

\begin{example}
  Let $E/\bQ$ be an elliptic curve and let
  $\sigma_{\ell}:G\rightarrow\GL_2(\bF_{\ell})$ be the representation
  induced by the action of $G$ on the $\ell$-torsion of $E$. Then
  $\det \sigma_{\ell} = \varphi_{\ell}$ is odd and $\sigma_{\ell}$ is
  usually irreducible, so Serre's conjecture\index{Serre's conjecture}
  implies that $\sigma_{\ell}$ is modular. From this one can, assuming
  Serre's conjecture, prove that $E$ is itself modular (see
  \cite{ribet:abvars}).
\end{example}

\begin{definition}[Modular representation]
  Let $\sigma:G\rightarrow \GL_2(\bF)$ ($\bF$ is a finite field) be an
  irreducible representation of the Galois group $G$. Then we say that
  the representation $\sigma$ is \defn{modular} if there is a modular
  form $f$, a prime $\lambda$, and an embedding $\bF\hookrightarrow
  \overline{\bF}_{\lambda}$ such that
  $\sigma\isom\overline{\rho}_{\lambda,f}$ over
  $\overline{\bF}_\lambda$.
\end{definition}

For more details, see Chapter~\ref{chap:serre} 
and \cite{ribet-stein:serre}.

\section{Wiles's perspective}

Suppose $E/\bQ$ is an elliptic curve and
$\rho_{\ell,E}:G\rightarrow\GL_2(\bZ_{\ell})$
the associated $\ell$-adic representation on the
Tate module $T_{\ell}$. Then by reducing 
we obtain a mod $\ell$ representation
$$\overline{\rho}_{\ell,E}=\sigma_{\ell,E}:G
\rightarrow \GL_2(\bF_{\ell}).$$
If we can show this representation is modular for infinitely many $\ell$
then we will know that $E$ is modular.

\begin{theorem}[Langlands and Tunnel]
If $\sigma_{2,E}$ and $\sigma_{3,E}$ are irreducible, then they
are modular. 
\end{theorem}

This is proved by using that $\GL_2(\bF_2)$ and
$\GL_2(\bF_3)$ are solvable so we may apply something called
``base change for $\GL_2$.''


\begin{theorem}[Wiles]
If $\rho$ is an $\ell$-adic representation which is irreducible
and modular mod $\ell$ with $\ell>2$ and certain other reasonable 
hypothesis are satisfied, then $\rho$ itself is modular.
\end{theorem}
 \chapter{Modular Forms of Level 1}

In this chapter, we view modular forms of level~$1$ both as
holomorphic functions on the upper half plane and functions on
lattices.   We then define Hecke operators on modular forms, and
derive explicit formulas for the action of Hecke operators on
$q$-expansions. An excellent reference for the theory of modular
forms of level~$1$ is Serre \cite[Ch.~7]{serre:arithmetic}.

\section{The Definition} Let $k$ be an integer.  The space
$S_k=S_k(1)$ of cusp forms of level~$1$ and weight~$k$ consists of
all functions~$f$ that are holomorphic on the upper half plane
$\sH$ and such that for all $\abcd\in\sltwoz$ one has
\begin{equation}\label{eqn:modformtrans}
f\left(\frac{a\tau+b}{c\tau+d}\right)=(c\tau+d)^k f(\tau),
\end{equation}
and~$f$ vanishes at infinity, in a sense which we will now make
precise.  The matrix $\smallmtwo{1}{1}{0}{1}$ is in $\sltwoz$, so
$f(\tau+1)=f(\tau)$.  Thus $f$ passes to a well-defined function
of $q(\tau)=e^{2\pi i\tau}$. Since for $\tau\in\h$ we have
$|q(\tau)|<1$, we may view $f(z)=F(q)$ as a function of $q$ on the
punctured open unit disc $\{q:0<|q|<1\}$.  The condition that
$f(\tau)$ vanishes at infinity means that $F(q)$ extends to a
holomorphic function on the open disc $\{q:|q|<1\}$ so that
$F(0)=0$.  Because holomorphic functions are represented by power
series, there is a neighborhood of $0$ such that
\[f(q)=\sum_{n=1}^{\infty}a_n q^n,\]
so for all $\tau\in\h$ with sufficiently large imaginary part (but
see Remark~\ref{rmk:allh} below),
$f(\tau) = \sum_{n=1}^{\infty} a_n e^{2\pi i n\tau}$.

It will also be useful to consider the slightly larger space $M_k(1)$ of
holomorphic functions on $\h$ that transform as above and are merely
required to be holomorphic at infinity.

\begin{remark}\label{rmk:allh}
In fact, the series $\sum_{n=1}^\infty a_n e^{2\pi i n\tau}$
converges for all $\tau\in\h$.  This is because the Fourier
coefficients $a_n$ are $O(n^{k/2})$ (see \cite[Cor.~2.1.6, pg.
43]{miyake}).
\end{remark}

\begin{remark}
In \cite[Ch.~7]{serre:arithmetic}, the weight is defined in the
same way, but in the notation our $k$ is twice his~$k$.
\end{remark}


\section{Some examples and conjectures} The space $S_k(1)$ of
cusp forms is a finite-dimensional complex vector space.  For~$k$
even we have $\dim S_k(1) = \lfloor k/12 \rfloor$ if $k\not\con
2\pmod{12}$ and $\lfloor k/12\rfloor-1$ if $k\con 2\pmod{12}$,
except when $k=2$ in which case the dimension is~$0$.  For
even~$k$, the space $M_k(1)$ has dimension $1$ more than the
dimension of $S_k(1)$, except when $k=2$ when both have
dimension~$0$. (For proofs, see, e.g., \cite[Ch.~7,
\S3]{serre:arithmetic}.)

By the dimension formula mentioned above, the first interesting
example is the space $S_{12}(1)$, which is a $1$-dimensional space
spanned by
\begin{align*}
\Delta(q) &= q \prod_{n=1}^{\infty} (1-q^n)^{24}\\
&= q - 24q^2 + 252q^3 - 1472q^4 + 4830q^5 - 6048q^6 - 16744q^7 +
84480q^8 \\
 & \mbox{}\qquad\! - 113643q^9 - 115920q^{10} +
    534612q^{11} - 370944q^{12} - 577738q^{13}
    +\cdots
\end{align*}
That $\Delta$ lies in $S_{12}(1)$ is proved in \cite[Ch.~7,
\S4.4]{serre:arithmetic} by expressing $\Delta$ in terms of
elements of $M_4(1)$ and $M_6(1)$, and computing the $q$-expansion
of the resulting expression.

\begin{example}
We compute the $q$-expansion of $\Delta$ in Sage:
\begin{lstlisting}
sage: delta_qexp(7)
q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 - 6048*q^6 + O(q^7)
\end{lstlisting}
In Sage, computing \verb|delta_qexp(10^6)| only takes a few seconds,
and computing up to precision \verb|10^8| is even reasonable. 
Sage does not use the formula 
$q \prod_{n=1}^{\infty} (1-q^n)^{24}$ given above, which would take
a very long time to directly evaluate, but instead uses the identity
$$
  \Delta(q) = \left( \sum_{n \ge 0} (-1)^n (2n+1) q^{n(n+1)/2}\right)^8,
$$
and computes the 8th power using asymptotically fast polynomial
arithmetic in $\Z[q]$, which involves a discrete fast Fourier
transform (implemented in \cite{flint}).
\end{example}

The Ramanujan $\tau$ function $\tau(n)$ assigns to $n$ the $n$th
coefficient of $\Delta(q)$.
\begin{conjecture}[Lehmer]
$\tau(n)\neq 0$ for all $n\geq 1$.
\end{conjecture}
This conjecture has been verified for $n\leq 22798241520242687999$
(Bosman, 2007 -- see \url{http://en.wikipedia.org/wiki/Tau-function}).

\begin{theorem}[Edixhoven et al.]
Let $p$ be a prime. There is a polynomial time algorithm to compute
$\tau(p)$, polynomial in the number of digits of~$p$.
\end{theorem}
Edixhoven's idea is to use $\ell$-adic cohomology and Arakelov theory
to find an analogue of the Schoof-Elkies-Atkin algorithm (which counts
the number $N_q$ of points on an elliptic curves over a finite field
$\F_q$ by computing $N_q \mod \ell$ for many primes $\ell$). 
Here's some of what Edixhoven has to say about his result:
\begin{quote}
  ``You need to compute on varying curves such as $X_1(\ell)$ for
  $\ell$ up to $\log(p)$ say.  An important by-product of my method is
  the computation of the mod~$\ell$ Galois representations associated
  to $\Delta$ in time polynomial in~$\ell$. So, it should be seen as
  an attempt to make the Langlands correspondence for $\GL_2$ over
  $\Q$ available computationally.''
\end{quote}

If $f\in M_k(1)$ and $g\in M_{k'}(1)$,  then it is easy
to see from the definitions that $fg\in M_{k+k'}(1)$.
Moreover,
 $\bigoplus_{k\geq 0} M_k(1)$ is a commutative
graded ring generated freely
by $E_4=1+240\sum_{n=1}^{\infty} \sigma_3(n)q^n$
and $E_6=1-504\sum_{n=1}^{\infty} \sigma_5(n) q^n$,
where $\sigma_d(n)$ is the sum of the $d$th powers
of the positive divisors of~$n$ (see
\cite[Ch.7, \S3.2]{serre:arithmetic}).

\begin{example}\label{ex:k36}
Because $E_4$ and $E_6$ generate, it is straightforward to write down
a basis for any space $M_k(1)$.  For example, the space
$M_{36}(1)$ has basis
\begin{align*}
   f_1 &= 1 + 6218175600q^4 + 15281788354560q^5 + \cdots\\
   f_2 &= q + 57093088q^4 + 37927345230q^5 + \cdots \\
   f_3 &= q^2 + 194184q^4 + 7442432q^5 +\cdots\\
   f_4 &= q^3 - 72q^4 + 2484q^5 +\cdots
\end{align*}
\end{example}

\section{Modular forms as functions on lattices} 
In order to
define Hecke operators, it will be useful to view modular forms as
functions on lattices in $\C$.

\begin{definition}[Lattice]
A {\em lattice} $L\subset \bC$ is a subgroup $L=\bZ\omega_1
+\bZ\omega_2$ for which $\omega_1, \omega_2\in \bC$ are linearly
independent over $\bR$.  
\end{definition}

We may assume that $\omega_1 / \omega_2
\in \sH = \{z\in\C\,:\, \Im(z)>0\}$.  Let $\cR$ be the set of all
lattices in $\C$.   Let $\cE$ be the set of isomorphism classes of
pairs $(E,\omega)$, where~$E$ is an elliptic curve over~$\C$ and
$\omega\in\Omega_E^1$ is a nonzero holomorphic differential
$1$-form on~$E$.  Two pairs $(E,\omega)$ and $(E',\omega')$ are
isomorphic if there is an isomorphism $\vphi:E\to E'$ such that
$\vphi^*(\omega')=\omega$.
\begin{proposition}\label{prop:RcorrE}
There is a bijection between $\cR$ and $\cE$ under which~$L\in\cR$
corresponds to $(\C/L,\dz)\in\cE$.
\end{proposition}
\begin{proof}
  We describe the maps in each direction, but leave the proof that
  they induce a well-defined bijection as an exercise for the reader
  [[add ref to actual exercise]]. Given $L\in \cR$, by Weierstrass
  theory the quotient $\C/L$ is an elliptic curve, which is equipped
  with the distinguished differential~$\omega$ induced by the
  differential $\dz$ on~$\C$.
\todo{See \cite[Appendix A1.1]{katz:padicprop} where the exact
curve, weierstrass $\wp$ and that $\omega=dx/y$ corresponds to
$dz$ is explained nicely.}

Conversely, if~$E$ is an elliptic curve over~$\C$ and $\omega\in
\Omega^1_E$ is a nonzero differential, we obtain a lattice~$L$
in~$\C$ by integrating homology classes:
\[
  L = L_\omega = \left\{\int_\gamma \omega : \gamma\in\H_1(E(\C),\Z) \right\}.
\]
\end{proof}

Let
\[
  \cB=\left\{(\omega_1,\omega_2):\omega_1,\omega_2\in\bC,
  \,\omega_1/\omega_2\in\h\right\},
\]
be the set of ordered basis of lattices in $\C$, ordered so that
$\omega_1/\omega_2\in\h$.  There is a left action of $\sltwoz$
on~$\cB$ given by
\[
  \abcd(\omega_1,\omega_2)\mapsto
      (a\omega_1+b\omega_2,c\omega_1+d\omega_2)
\]
and $\sltwoz\backslash \cB\isom \cR$.  (The action is just the left
action of matrices on column vectors, except we write
$(\omega_1,\omega_2)$ as a row vector since it takes less space.)

Give a modular form $f\in M_k(1)$, associate to $f$ a function
$F:\cR\to\C$ as follows.  First, on lattices of the special form
$\Z\tau+\Z$, for $\tau\in\h$, let $F(\Z\tau+\Z) = f(\tau)$.

In order to extend~$F$ to a function on all lattices, note that~$F$
satisfies the homogeneity condition $F(\lambda L)=\lambda^{-k} F(L)$,
for any $\lambda\in\C$ and $L\in\cR$. Then
\[
  F(\Z\omega_1 + \Z\omega_2) = \omega_2^{-k} F(\Z\omega_1/\omega_2 + \Z)
            := \omega_2^{-k} f(\omega_1/\omega_2).
\]

That $F$ is well-defined exactly amounts to the transformation
condition (\ref{eqn:modformtrans}) that $f$ satisfies.
\begin{lemma}\label{lem:Fwelldef}
The lattice function $F:\cR\to \C$ associated to $f\in M_k(1)$ is
well defined.
\end{lemma}
\begin{proof}
Suppose $\Z\omega_1 + \Z\omega_2 = \Z\omega_1'+\Z\omega_2'$ with
$\omega_1/\omega_2$ and $\omega_1'/\omega_2'$ both in $\h$. We
must verify that $\omega_2^{-k}f(\omega_1/\omega_2) =
(\omega_2')^{-k}f(\omega_1'/\omega_2')$.  There exists
$\abcd\in\sltwoz$ such that $\omega_1'=a\omega_1+b\omega_2$ and
$\omega_2'=c\omega_1 + d\omega_2$.  Dividing, we see that
$\omega_1'/\omega_2' = \abcd(\omega_1/\omega_2)$.  Because~$f$ is
a weight~$k$ modular form, we have
\[
  f\left(\frac{\omega_1'}{\omega_2'}\right)
  =  f\left(\mtwo{a}{b}{c}{d}\left(\frac{\omega_1}{\omega_2}\right)\right)
  = \left(c\frac{\omega_1}{\omega_2} + d\right)^{k}f\left(\frac{\omega_1}{\omega_2}\right).
\]
Multiplying both sides by $\omega_2^k$ yields
\[
   \omega_2^k f\left(\frac{\omega_1'}{\omega_2'}\right)
  = (c\omega_1 + d\omega_2)^k
f\left(\frac{\omega_1}{\omega_2}\right).
\]
Observing that $\omega_2'=c\omega_1+d\omega_2$ and dividing again
completes the proof.
\end{proof}
Since $f(\tau) = F(\Z\tau + \Z)$, we can recover $f$ from $F$, so
the map $f\mapsto F$ is injective.  Moreover, it is surjective in
the sense that if $F$ is homogeneous of degree~$-k$, then $F$
arises from a function $f:\h\to\C$ that transforms like a modular
form.  More precisely, if $F:\cR\to \C$ satisfies the homogeneity
condition $F(\lambda L)=\lambda^{-k} F(L)$, then the function
$f:\h\to\C$ defined by $f(\tau) = F(\Z\tau+\Z)$ transforms like a
modular form of weight~$k$, as the following computation shows:
For any $\abcd\in\sltwoz$ and $\tau\in\h$, we have
\begin{align*}
f\left(\frac{a\tau+b}{c\tau+d}\right)&=
  F\left(\bZ\frac{a\tau+b}{c\tau+d}+\bZ\right)\\
&= F((c\tau+d)^{-1}\left(\bZ(a\tau+b)+\bZ(c\tau+d))\right)\\
&= (c\tau+d)^k F\left(\bZ(a\tau+b)+\bZ(c\tau+d)\right)\\
&= (c\tau+d)^k F(\bZ\tau+\bZ)\\
&= (c\tau+d)^k f(\tau).
\end{align*}
Say that a function $F:\cR\to \C$ is holomorphic on
$\h\union\{\infty\}$ if the function $f(\tau)=F(\Z\tau+\Z)$ is. We
summarize the above discussion in a proposition.
\begin{proposition}
There is a bijection between $M_k(1)$ and functions $F:\cR\to \C$
that are homogeneous of degree $-k$ and holomorphic on
$\h\union\{\infty\}$.  Under this bijection $F:\cR\to\C$
corresponds to $f(\tau)=F(\Z\tau+\Z)$.
\end{proposition}

\section{Hecke operators} Define a map $T_n$ from the free
abelian group generated by all $\bC$-lattices into itself by
\[
  T_n(L)= \sum_{\substack{L'\subset L\\  [L:L']=n}} L',
\]
where the sum is over all sublattices $L'\subset L$ of index~$n$.
For any function $F:\cR\to\C$ on lattices, define
$T_n(F):\cR\to\C$  by
\[
  (T_n(F))(L)=n^{k-1}\sum_{\substack{L'\subset L\\  [L:L']=n}} F(L').
\]
If $F$ is homogeneous of degree~$-k$, then $T_n(F)$ is also
homogeneous of degree~$-k$.

In the next Section, we will show that $\gcd(n,m)=1$ implies
$T_nT_m=T_{nm}$ and that $T_{p^k}$ is a polynomial in $\Z[T_p]$.

Suppose $L'\subset L$ with $[L:L']=n$.  Then
every element of $L/L'$ has order dividing~$n$, so $nL\subset
L'\subset L$  and
\[
  L'/nL\subset L/nL\ncisom (\bZ/n\bZ)^2.
\]
Thus the subgroups of $(\bZ/n\bZ)^2$ of order~$n$ correspond to
the sublattices~$L'$ of~$L$ of index~$n$. When $n=\ell$ is prime,
there are $\ell+1$ such subgroups, since the subgroups correspond
to nonzero vectors in $\bF_{\ell}$ modulo scalar equivalence, and
there are $(\ell^2-1)/(\ell-1)=\ell+1$ of them.


Recall from Proposition~\ref{prop:RcorrE} that there is a
bijection between the set $\cR$ of lattices in~$\C$ and the set
$\cE$ of isomorphism classes of pairs $(E,\omega)$, where $E$
is an elliptic curve over $\C$ and $\omega$
is a nonzero differential on~$E$.

Suppose $F:\cR\to\C$ is homogeneous of degree~$-k$, so $F(\lambda
L)=\lambda^{-k} F(L)$. Then we may also view $T_\ell$ as a sum
over lattices that contain $L$ with index~$\ell$, as follows.
Suppose $L'\subset L$ is a sublattice of index~$\ell$ and set
$L''=\ell^{-1}L'$.  Then we have a chain of inclusions
\[
  \ell L \subset L' \subset L \subset \ell^{-1} L' = L''.
\]
Since $[\ell^{-1}L':L']=\ell^2$ and $[L:L']=\ell$, it follows that
$[L'':L]=\ell$.  Because $F$ is homogeneous of degree $-k$,
\begin{equation}\label{eqn:heckelat}
 T_\ell(F)(L) = \ell^{k-1}\sum_{[L:L']=\ell}F(L')
         = \frac{1}{\ell}\sum_{[L'':L]=\ell}F(L'').
\end{equation}

%which helps explain the extra factor of $n^{k-1}$ in our
%definition of $T_n F$ -- we are ``averaging'' over the sublattices
%(note that there are $\ell+1$ terms yet we divide by $\ell$ so
%we aren't exactly averaging).

\comment{
We now give a geometric description of the $\ell$th Hecke
operator\index{Hecke operator}. Let $L\subset L''$ be lattices
with $[L'':L]=\ell$, and let $E=\C/L$ and $E''=\C/L''$ be the
corresponding elliptic curves. Then $E[\ell]=\frac{1}{\ell}L/L$
contains $H=L''/L$.  Furthermore, $H$ is a line through the origin
in the two-dimensional affine space $E[\ell]\isom
\bA^2_{\F_\ell}$. The $\ell$th Hecke operator is
\[
  T_\ell(E) = \frac{1}{\ell}\sum_{\substack{H\subset E[\ell] \\ \text{of order~$\ell$}}} E/H.
\]

For any $H\subset E[\ell]$, let $\pi_H:E\into E/H$ be the natural
projection map, and let $\hat{\pi}_H:E/H\into E$ be the dual
isogeny.  In terms of complex tori, $\pi_H:\C/L\to \C/L''$ is
induced by the map $1:\C\to\C$, and $\hat{\pi}_H:\C/L''\to \C/L$
is induced by $\ell:\C\to\C$.   Because $\cR\isom \cE$, we may
view the Hecke operator as an operator on formal linear
combinations of pairs $(E,\omega)$, and from this point of view we
have
\begin{equation}\label{eqn:hecke_ell}
T_\ell(E,\omega) =\ell^{k-1}\sum_{H\subset E[\ell]}
(E/H,\hat{\pi}^{*}(\omega))\\
  =\frac{1}{\ell} \sum_{H\subset E[\ell]}(E/H,\pi_{*}\omega),
\end{equation}
where $\pi=\pi_H$ in the sum. The following basic remarks help
explain why (\ref{eqn:hecke_ell}) above is a restatement of
(\ref{eqn:heckelat}).   Suppose $\vphi:\C/L\to \C/L'$ is a
homomorphism, so~$\vphi$ is given by multiplication by $\alpha\in
\C$, where $\alpha L\subset L'$.
%We have $\Omega^1_E=\Hom(T_0(E),\C)=\Hom(\C,\C)=\C$ and likewise for
%$\Omega^1_{E'}$.
We have $\vphi^*(\dz)=d(\vphi(z))=\alpha{}\dz$, and $\vphi_*(\dz)
= (1/\alpha)\dz$. Suppose $(E,\omega)=(\C/L,\dz)$ and $H\subset
E[\ell]$ has order~$\ell$.  Then $\pi:E\to E/H$ is the natural
projection $\C/L\to \C/L''$, so $\alpha=1$, and $\pi_*\dz=\dz$, so
$$(E/H,\pi_*\omega) = (\C/L'',\dz).$$  As mentioned above, the map
$\hat{\pi}:\C/L''\to \C/L$ is given by multiplication by $\ell$
on~$\C$, which has degree~$\ell$, so $\hat{\pi}^*(\dz) = \ell\dz$,
and
\[
  (E/H,\hat{\pi}^*(\omega)) = (\C/L'', \ell\dz) \isom
    (\C/\ell{}L'', \dz),
 \]
where the last isomorphism is induced by multiplication by~$\ell$.

}

% Lecture 4, 1/24/96

\subsection{Relations Between Hecke Operators}\label{sec:heckerel}
In this section we show that the Hecke operators $T_n$, viewed as
functions on the free abelian group on lattices via 
$$
 T_n(L)= \sum_{\substack{L'\subset L\\ [L:L']=n}} L'
$$ 
are multiplicative  satisfy a recurrence for prime powers.  
Let $R_p(L) = pL\in \cR$ be the lattice $L$ scaled by $p$ (this is 
not $p$ copies of $L$ in the free abelian group).

\begin{proposition}\label{prop:heckerel}
If $\gcd(n,m)=1$, then 
\begin{equation}\label{eqn:heckemult}
T_{nm} = T_n T_m.
\end{equation}
If $r\geq 1$ and $p$ is a prime, then
\begin{equation}\label{eqn:heckepolyp}
   T_{p^{r+1}} = T_{p^r} T_p  - p R_p T_{p^{r-1}}.
\end{equation}
\end{proposition}
\begin{proof}
(Compare \cite[Cor.~1, pg.~99]{serre:arithmetic}.)

Proving relation \eqref{eqn:heckemult} is equivalent to showing that
for every sublattice $L''$ of $L$ of index $nm$, there is a unique
sublattice $L'\subset L$ with $L''\subset L'$ such that $[L:L']=m$ and
$[L':L'']=n$. To see this, note that the abelian group $L/L''$ is of
order $nm$, so it decomposes {\em uniquely} as a product of subgroups
of orders $n$ and $m$.  The unique subgroup of $L/L''$ of order $m$
corresponds to the unique sublattice $L'\subset L$ such that
$[L:L']=m$ and $[L':L'']=n$.

To prove \eqref{eqn:heckepolyp}, let $L$ be a lattice and note that
$$T_{p^r} T_p(L), \qquad T_{p^{r+1}}(L),\qquad\text{ and}\qquad R_p T_{p^{r-1}}(L)$$ 
are all linear combinations of lattices of index $p^{r+1}$ in $L$
(note that $R_p$ commutes with $T_{p^{r-1}}$ and $[L:R_p(L)]=p^2$).
Let $L''$ be a lattice of index $p^{r+1}$ in $L$.  In the linear
combination $L''$ appears with coefficients $a,b,c\in\Z$ (say), and
our goal is to prove that $a = b+pc$.  Note that $b=1$, since the
lattices in the sum $T_{p^{r+1}}(L)$ each appear exactly once, so in
fact we must prove that $a = 1 + pc$.  The lattices appearing in $R_p
T_{p^{r-1}}(L) = T_{p^{r-1}}(R_pL) = T_{p^{r-1}}(pL)$ are exactly
those of index $p^{r-1}$ in $pL$, each with multiplicity $1$.  We
consider two cases, depending on whether or not $L''$ is in that sum.
\begin{itemize}
\item {\bf Case $L''\subset pL$, so $c=1$:} We must show that $a=1+p$. 
Every single one of the $p+1$ sublattices of $L$ of index $p$ must contain
$pL$, so they also all contain $L''\subset pL$.  Thus $a=p+1$, as claimed.

\item {\bf Case $L''\not\subset pL$, so $c=0$:} We must show that $a=1$.
We have that $a$ is the number of lattices $L'$ of index $p$ in $L$ 
with $L''\subset L'\subset L$.
Let $L'$ be such a lattice.  Since $[L:L']=p$, we have $pL\subset L'$,
and the image of $L'$ in $L/pL$ is of order $p$.
Since $L''\not\subset pL$, the image of $L''$ in 
$L/pL$ is also of order $p$ (the image is nonzero and contained
in the image of $L'$), and since $L''\subset L'$, we thus
must have that the images of $L''$ and $L'$ in $L/pL$ are the same
subgroup of order $p$.  Hence $L'$ is completely determined by $L''$,
so there is exactly one $L'$ that works, hence $a=1$.
\end{itemize}


\end{proof}

\begin{corollary}
The Hecke operators $T_n$ commute with each other, for all $n$.
\end{corollary}



\section{Hecke operators directly on $q$-expansions}
Recall that the $n$th Hecke operator $T_n$ of weight $k$ on
lattice functions is given by
\begin{equation}
\label{eqn:TnF}
T_n(F)(L)=n^{k-1}\sum_{\substack{L'\subset L\\ [L:L']=n}} F(L').
\end{equation}

Modular forms of weight~$k$ correspond to holomorphic functions of
degree~$-k$ on lattices, and each $T_n$ extends to an operator on
these functions on lattices, so $T_n$ defines on operator on $M_k(1)$.


Extending $F$ linearly to a function on the free abelian group on lattices,
we have
$$
 T_n(F)(L) = n^{k-1} F(T_n(L)),
$$
which allows us to apply Proposition~\ref{prop:heckerel}.
\begin{proposition}
The above action of the Hecke operators on 
homomogenous lattice function $F:\cR\to \C$ of degree $-k$
(equivalently, on $M_k(1)$)
satisfies the following relations:
\begin{eqnarray*}
  T_{nm} =& T_n T_m \qquad\qquad\quad\,\,\,{} & \qquad\text{if }\gcd(n,m)=1,\\
 T_{p^{r+1}} =& T_{p^r} T_p - p^{k-1} T_{p^{r-1}} \hfill & \qquad\text{if } r\geq 1\text{ and } p \text{ prime.}
\end{eqnarray*}
\end{proposition}
\begin{proof}
  We compute $F$ of both sides of the formulas in
  Proposition~\ref{prop:heckerel}, applied to a lattice $L$.
The first relation is immediate since
$(nm)^{k-1} = n^{k-1}m^{k-1}$.  For the
second, note that having extended $F$ linearly to the free
abelian group on lattices, we have
$$
  F((pR_p)(L)) = p\cdot F(pL) = p\cdot p^{-k}F(L) = p^{1-k}F(L).
$$
Thus \eqref{eqn:heckepolyp} implies that if $L$ is a lattice, then
\begin{equation}\label{eqn:trueFppow}
F(T_{p^{r+1}}(L)) = F(T_{p^r} T_p(L)) - p^{1-k} F(T_{p^{r-1}}(L)).
\end{equation}
Unwinding definitions, our goal is to prove that
$$
(p^{r+1})^{k-1} F(T_{p^{r+1}}(L)) = (p^{r})^{k-1} p^{k-1} F(T_{p^r} T_p(L)) 
   - p^{k-1} (p^{r-1})^{k-1} F(T_{p^{r-1}}(L)).
$$
Dividing both sides by $p^{(r+1)(k-1)}$ and using that \eqref{eqn:trueFppow} holds,
we see that this follows from the fact that
$$
\frac{p^{k-1} (p^{r-1})^{k-1}}{p^{(r+1)(k-1)}} = p^{1-k}.
$$
\end{proof}



A holomorphic function on the unit disk is determined by its Fourier
expansion, so Fourier expansion defines an injective map $M_k(1)\hra
\C[[q]]$.  In this section, we describe $T_n(\sum a_m q^m)$ explicitly
as a $q$-expansion.

\subsection{Explicit description of sublattices}\label{sec:explattice} In order to describe $T_n$ more
explicitly, we enumerate the sublattices $L'\subset L$
of index~$n$.  More precisely, we give a basis for each~$L'$ in
terms of a basis for~$L$.  Note that $L/L'$ is a group of
order~$n$ and
\[
L'/nL \subset L/nL=(\bZ/n\bZ)^2.
\]
Write $L=\bZ\omega_1+\bZ\omega_2$, let $Y_2$ be the cyclic
subgroup of $L/L'$ generated by $\omega_2$ and let $d=\#Y_2$. If
$Y_1=(L/L')/Y_2$, then $Y_1$ is generated by the image of
$\omega_1$, so it is a cyclic group of order $a=n/d$.  Our goal is
to exhibit a basis of $L'$. Let $\omega_2'=d\omega_2\in L'$ and
use that $Y_1$ is generated by the image of $\omega_1$ to write
$a\omega_1=\omega_1'-b\omega_2$ for some integer~$b$ and some
$\omega_1'\in L'$. Since~$b$ is only well-defined modulo~$d$ we
may assume $0\leq b\leq d-1$. Thus
$$
\Bigl(\begin{matrix}\omega_1'\\ \omega_2'\end{matrix}\Bigr)
=
\Bigl(\begin{matrix}a&b\\0&d\end{matrix}\Bigr)
\Bigl(\begin{matrix}\omega_1\\ \omega_2\end{matrix}\Bigr)
$$
and the change of basis matrix has determinant $ad=n$. Since
\[
 \bZ\omega_1'+\bZ\omega_2'\subset L' \subset
  L=\bZ\omega_1+\bZ\omega_2
\]
and $[L:\bZ\omega_1'+\bZ\omega_2']=n$ (since the change of basis
matrix has determinant~$n$) and $[L:L']=n$ we see that
$L'=\bZ\omega_1'+\bZ\omega_2'$.

\begin{proposition}
Let~$n$ be a positive integer.  There is a one-to-one
correspondence between sublattices $L'\subset L$ of index~$n$ and
matrices $\smallmtwo{a}{b}{0}{d}$ with $ad=n$ and $0\leq b\leq
d-1$.
\end{proposition}
\begin{proof}
The correspondence is described above.   To check that it is a
bijection, we just need to show that if
$\gamma=\smallmtwo{a}{b}{0}{d}$ and
$\gamma'=\smallmtwo{a'}{b'}{0}{d'}$ are two matrices satisfying
the listed conditions, and
\[
  \Z (a\omega_1 + b\omega_2) + \Z d \omega_2
     =
  \Z (a\omega_1' + b\omega_2') + \Z d \omega_2',
\]
then $\gamma=\gamma'$. Equivalently, if $\sigma\in\SL_2(\Z)$ and
$\sigma\gamma=\gamma'$, then $\sigma=1$.   To see this, we compute
\[
  \sigma = \gamma'\gamma^{-1}
         = \frac{1}{n}\mtwo{a'd}{ab'-a'b}{0}{ad'}.
\]
Since $\sigma\in\SL_2(\Z)$, we have $n\mid a'd$, and $n\mid ad'$,
and $aa'dd'=n^2$. If $a'd>n$, then because $aa'dd'=n^2$, we would
have $ad'<n$, which would contradict the fact that $n\mid ad'$;
also, $a'd<n$ is impossible since $n\mid a'd$. Thus $a'd=n$ and
likewise $ad'=n$. Since $ad=n$ as well, it follows that $a'=a$ and
$d'=d$, so $\sigma=\smallmtwo{1}{t}{0}{1}$ for some~$t\in\Z$. Then
$\sigma\gamma=\smallmtwo{a}{b+dt}{0}{d}$, which implies that
$t=0$, since $0\leq b\leq  d-1$ and $0\leq b+dt\leq d-1$.
\end{proof}

\begin{remark}
As mentioned earlier, when $n=\ell$ is prime, there are $\ell+1$
sublattices of index~$\ell$. In general, the number of such
sublattices is the sum of the positive divisors of $n$
(exercise)\edit{Put reference to actual exercise}.
\end{remark}

\subsection{Hecke operators on $q$-expansions}\label{sec:heckeonq}
Recall that if~$f\in M_k(1)$, then~$f$ is a holomorphic function
on $\sH\cup\{\infty\}$ such that
\[
  f(\tau)=f\left(\frac{a\tau+b}{c\tau+d}\right)(c\tau+d)^{-k}
\]
for all $\abcd\in\sltwoz$.  Using Fourier expansion we write
\[
  f(\tau)=\sum_{m=0}^{\infty} c_m e^{2\pi i\tau m},
\]
and say~$f$ is a cusp form if $c_0=0$.  Also, there is a bijection
between modular forms~$f$ of weight~$k$ and holomorphic lattice
functions $F:\cR\to\C$ that satisfy $F(\lambda
L)=\lambda^{-k}F(L)$; under this bijection $F$ corresponds to
$f(\tau)=F(\bZ\tau+\bZ)$.

Now assume $f(\tau)=\sum_{m=0}^{\infty} c_m q^m$ is a modular form
with corresponding lattice function $F$.  Using the explicit
description of sublattices from Section~\ref{sec:explattice}
above, we can describe the action of the Hecke operator $T_n$ on
the Fourier expansion of $f(\tau)$, as follows:
\begin{align*}
T_nF(\bZ\tau+\bZ) & =  n^{k-1}\sum_{\substack{a,b,d\\ ad=n\\ 0\leq
b\leq d-1}}
F((a\tau+b)\bZ + d\bZ)\\
& = n^{k-1}\sum d^{-k} F\left(\frac{a\tau+b}{d}\bZ+\bZ\right)\\
& = n^{k-1}\sum d^{-k} f\left(\frac{a\tau+b}{d}\right)\\
& = n^{k-1}\sum_{a,d,b,m} d^{-k}c_m e^{2\pi i\left(\frac{a\tau+b}{d}\right)m}\\
& = n^{k-1}\sum_{a,d,m} d^{1-k}c_m e^{\frac{2\pi i a m \tau}{d}}
\frac{1}{d}\sum_{b=0}^{d-1} \left(e^{\frac{2\pi i m}{d}}\right)^b\\
& = n^{k-1}\sum_{\substack{ad=n\\m'\geq 0}}d^{1-k} c_{dm'}e^{2\pi i a m' \tau}\\
& = \sum_{\substack{ad=n\\m'\geq 0}} a^{k-1} c_{dm'}q^{am'}.
\end{align*}
In the second to the last expression we let $m=dm'$ for $m'\geq
0$, then use that the sum $\frac{1}{d}\sum_{b=0}^{d-1}
(e^{\frac{2\pi i m}{d}})^b$ is only nonzero if $d\mid{}m$,
in which case the sum equals $1$.

Thus
$$T_nf(q)=\sum_{\substack{ad=n\\m\geq 0}} a^{k-1}c_{dm} q^{am}.$$
Put another way, if $\mu$ is a nonnegative integer, then the
coefficient of $q^{\mu}$ is
\[
  \sum_{\substack{a|n\\ a|\mu}}a^{k-1}c_{\frac{n\mu}{a^2}}.
\]
(To see this, let $m=\mu/a$ and $d=n/a$ and substitute into the
formula above.)

\begin{remark}\label{rmk:level1rat}
When $k\geq 1$ the coefficients of $q^{\mu}$ for all $\mu$ belong
to the $\bZ$-module generated by the $c_m$.
\end{remark}

\begin{remark}
Setting $\mu=0$ gives the constant coefficient of $T_n f$ which is
$$\sum_{a|n}a^{k-1}c_0 = \sigma_{k-1}(n)c_0.$$
Thus if $f$ is a cusp form so is $T_nf$. ($T_nf$ is holomorphic
since its original definition is as a finite sum of holomorphic
functions.)
\end{remark}

\begin{remark}\label{rem:hecke_const_coeff}
Setting $\mu=1$ shows that the coefficient of $q$ in $T_n f$ is
$\sum_{a|1}a^{k-1}c_n=c_n$. As an immediate corollary we have the
following important result.
\end{remark}

\begin{corollary}
If $f$ is a cusp form such that $T_n f$ has 0 as coefficient of
$q$ for all $n\geq 1$, then $f=0$.
\end{corollary}


In the special case when $n=p$ is prime, the action action of $T_p$ on
the $q$-expansion of~$f$ is given by the following formula:
$$T_p f = \sum_{\mu\geq 0} \sum_{\substack{a|p\\a|\mu}}a^{k-1}
                         c_{\frac{n\mu}{a^2}} q^{\mu}. $$
Since $p$ is prime, either $a=1$ or $a=p$. When $a=1$,
$c_{p\mu}$ occurs in the coefficient of $q^{\mu}$ and when $a=p$,
we can write $\mu=p\lambda$ and we get terms $p^{k-1}c_{\lambda}$
in $q^{p\lambda}$. Thus
$$T_p f = \sum_{\mu\geq 0}c_{p\mu}q^{\mu}+
          p^{k-1}\sum_{\lambda\geq 0} c_{\lambda}q^{p\lambda}.$$

\subsection{The Hecke algebra and eigenforms}

\begin{definition}[Hecke Algebra]
The {\em Hecke algebra} $\T$ associated to $M_k(1)$ is the subring
of $\End(M_k(1))$ generated by the operators $T_n$ for all~$n$.
Similarly, the {\em Hecke algebra} associated to $S_k(1)$ is the
subring of $\End(S_k(1))$ generated by all Hecke operators $T_n$.
\end{definition}
The Hecke algebra is commutative because $T_{p^\nu}$ is a polynomial
in $T_p$ and when $\gcd(n,m)=1$ we have $T_n T_m = T_{nm}=T_{mn} = T_m
T_n$ (see Section~\ref{sec:heckerel}).  Also, $\T$ is of finite rank
over~$\Z$, because of Remark~\ref{rmk:level1rat} and that the finite
dimensional space $S_k(1)$ has a basis with $q$-expansions in
$\Z[[q]]$.


\begin{definition}[Eigenform]
An {\em eigenform} $f\in M_k(1)$ is a nonzero element such that
$f$ is an eigenvector for every Hecke operator $T_n$. If $f\in
S_k(1)$ is an eigenform, then $f$ is {\em normalized} if the
coefficient of $q$ in the $q$-expansion of~$f$ is~$1$.  We
sometimes called a normalized cuspidal eigenform a {\em newform}.
\end{definition}

If $f=\sum_{n=1}^{\infty} c_n q^n$ is a normalized eigenform, then
Remark~\ref{rem:hecke_const_coeff} implies that $T_n(f) = c_n f$.
Thus the coefficients of a newform are exactly the system of
eigenvalues of the Hecke operators acting on the newform.

\begin{remark}
  It follows from Victor Miller's thesis [[ref my modform book??]]
  that $T_1,\ldots, T_n$ generate $\T\subset \End(S_k(1))$, where
  $n=\dim S_k(1)$.
\end{remark}

\subsection{Examples}

We compute the space of weight 12 modular forms of level 1, along with its cuspidal
subspace:
\begin{lstlisting}
sage: M = ModularForms(1,12, prec=3)
sage: M.basis()
[
q - 24*q^2 + O(q^3),
1 + 65520/691*q + 134250480/691*q^2 + O(q^3)
]
sage: M.hecke_matrix(2)
[ -24    0]
[   0 2049]
sage: S = M.cuspidal_subspace()
sage: S.hecke_matrix(2)
[-24]
sage: factor(M.hecke_polynomial(2))
(x - 2049) * (x + 24)
\end{lstlisting}
\vspace{1em}

We also compute the space of forms of weight 40:
\begin{lstlisting}
sage: M = ModularForms(1,40)
sage: M.basis()
[
q + 19291168*q^4 + 37956369150*q^5 + O(q^6),
q^2 + 156024*q^4 + 57085952*q^5 + O(q^6),
q^3 + 168*q^4 - 12636*q^5 + O(q^6),
1 + 1082400/261082718496449122051*q + ...
]
sage: M.hecke_matrix(2)
[             0   549775105056 14446985236992              0]
[             1         156024     1914094476              0]
[             0            168         392832              0]
[             0              0              0   549755813889]
sage: factor(M.hecke_polynomial(2))
(x - 549755813889) * 
     (x^3 - 548856*x^2 - 810051757056*x + 213542160549543936)
\end{lstlisting}

% \begin{verbatim}
% > M := ModularForms(1,12);
% > HeckeOperator(M,2);
% [  2049 196560]
% [     0    -24]
% > S := CuspidalSubspace(M);
% > HeckeOperator(S,2);
% [-24]
% > Factorization(CharacteristicPolynomial(HeckeOperator(M,2)));
% [
%     <x - 2049, 1>,
%     <x + 24, 1>
% ]
% > M := ModularForms(1,40);
% > M;
% Space of modular forms on Gamma_0(1) of weight 40 and dimension 4
% over Integer Ring.
% > Basis(M);
% [
%     1 + 1250172000*q^4 + 7541401190400*q^5 + 9236514405888000*q^6
%     + 3770797689077760000*q^7 + O(q^8),
%     q + 19291168*q^4 + 37956369150*q^5 + 14446985236992*q^6 +
%     1741415886056000*q^7 + O(q^8),
%     q^2 + 156024*q^4 + 57085952*q^5 + 1914094476*q^6 -
%     27480047616*q^7 + O(q^8),
%     q^3 + 168*q^4 - 12636*q^5 + 392832*q^6 - 7335174*q^7 + O(q^8)
% ]
% > HeckeOperator(M,2);
% [549755813889 0 1250172000 9236514405888000]
% [0 0 549775105056 14446985236992]
% [0 1 156024 1914094476]
% [0 0 168 392832]
% > Factorization(CharacteristicPolynomial(HeckeOperator(M,2)));
% [
%     <x - 549755813889, 1>,
%     <x^3 - 548856*x^2 - 810051757056*x + 213542160549543936, 1>
% ]
% \end{verbatim}





\section{Two Conjectures about Hecke operators on level~$1$ modular forms}

\subsection{Maeda's conjecture}\label{sec:maeda_conj}

\begin{conjecture}[Maeda]
Let $k$ be a positive integer such that $S_k(1)$ has positive
dimension and let $T\subset \End(S_k(1))$ be the Hecke algebra.
Then there is only one $\Gal(\Qbar/\Q)$ orbit of normalized
eigenforms of level~$1$.
\end{conjecture}
There is some numerical evidence for this conjecture.  It is true
for $k\leq 2000$, according to \cite{farmer-james:maeda}.
The MathSciNet reviewer of \cite{farmer-james:maeda} said
``In the present paper the authors take a big step forward towards
proving Maeda's conjecture in the affirmative by establishing that
the Hecke polynomial $T_{p,k}(x)$ is irreducible and has full
Galois group over $\Bbb Q$ for $k\le2000$ and $p<2000, p$ prime.''
Using Sage, Alex Ghitza verified the conjecture for $k\leq 4096$ (see
\cite{ghitza:maeda}).  Buzzard shows in \cite{buzzard:t2} that for the
weights $k\leq 228$ with $k/12$ a prime, the Galois group of the
characteristic polynomial of $T_2$ is the full symmetric group, and
is, in particular, irreducible.


% {\bf Possible student project:}\edit{Remove from book.} I have
% computed the characteristic polynomial of $T_2$ for all weights
% $k\leq 3000$:
% \begin{center}
% {\tt http://modular.fas.harvard.edu/Tables/charpoly\_level1/t2/}
% \end{center}
% However, I never bothered to try to prove that these are all
% irreducible, which would establish Maeda's conjecture for $k\leq
% 3000$. 


\subsection{The Gouvea-Mazur conjecture}
Fix a prime~$p$, and let $F_{p,k}\in\Z[x]$ be the characteristic
polynomial of $T_p$ acting on $M_k(1)$.  The {\em slopes} of
$F_{p,k}$ are the $p$-adic valuations $\ord_p(\alpha)\in\Q$ of the
roots $\alpha\in\Qpbar$ of $F_{p,k}$. They can be computed easily
using Newton polygons.\edit{Jared Weinstein suggests we add some
background explaining newton polygons and why they are helpful.}
For example, the $p=5$ slopes for
$F_{5,12}$ are $0,1,1$, for $F_{5,12+4\cdot 5}$ they are
$0,1,1,4,4$, and for $F_{5,12+4\cdot 5^2}$ they are $
 0, 1, 1, 5, 5, 5, 5, 5, 5, 10, 10, 11, 11, 14, 14, 15, 15, 16,
16.
$

\begin{lstlisting}
sage: def s(k,p):
...       M = ModularForms(1,k)
...       v = M.hecke_polynomial(p).newton_slopes(p)
...       return list(sorted(v))
sage: s(12,5)
[0, 1]
sage: s(12 + 4*5, 5)
[0, 1, 4]
sage: s(12 + 4*5^2, 5)
[0, 1, 5, 5, 5, 10, 11, 14, 15, 16]
sage: s(12 + 4*5^3, 5)          # long time 
!! WAY TOO SLOW -- TODO -- see trac 9749 !!
\end{lstlisting}

Instead, we compute the slopes more directly as follows (this is fast):

\begin{lstlisting}
sage: def s(k,p):
...       d = dimension_modular_forms(1, k)
...       B = victor_miller_basis(k, p*d+1)
...       T = hecke_operator_on_basis(B, p, k)
...       return list(sorted(T.charpoly().newton_slopes(p)))
sage: s(12,5)
[0, 1]
sage: s(12 + 4*5, 5)
[0, 1, 4]
sage: s(12 + 4*5^2, 5)
[0, 1, 5, 5, 5, 10, 11, 14, 15, 16]
sage: s(12 + 4*5^3, 5)
[0, 1, 5, 5, 5, 10, 11, 14, 15, 16, 20, 21, 24, 25, 27, 
 30, 31, 34, 36, 37, 40, 41, 45, 46, 47, 50, 51, 55, 55, 
 55, 59, 60, 63, 64, 65, 69, 70, 73, 74, 76, 79, 80, 83]
\end{lstlisting}


% \begin{verbatim}
% > function s(k,p)
%     return NewtonSlopes(CharacteristicPolynomial(
%                HeckeOperator(ModularForms(1,k),p)),p);
%   end function;
% > s(12,5);
% [* 0, 1 *]
% > s(12+4*5,5);
% [* 0, 1, 4 *]
% > s(12+4*5^2,5);
% [* 0, 1, 5, 5, 5, 10, 11, 14, 15, 16 *]
% > s(12+4*5^3,5);
% [* 0, 1, 5, 5, 5, 10, 11, 14, 15, 16, 20, 21, 24, 25, 27, 30, 31,
%   34, 36, 37, 40, 41, 45, 46, 47, 50, 51, 55, 55, 55, 59, 60, 63,
%   64, 65, 69, 70, 73, 74, 76, 79, 80, 83 *]
% \end{verbatim}

Let $d(k,\alpha,p)$ be the multiplicity of $\alpha$ as a slope of
$F_{p,k}$.
\begin{conjecture}[Gouvea-Mazur, 1992]\label{conj:gm}
Fix a prime~$p$ and a nonnegative rational number~$\alpha$.
Suppose $k_1$ and $k_2$ are integers with $k_1, k_2\geq
2\alpha+2$, and $k_1\con k_2\pmod{p^n(p-1)}$ for some integer $n\geq
\alpha$.  Then $d(k_1,\alpha,p) = d(k_2,\alpha,p)$.
\end{conjecture}
Notice that the above examples, with $p=5$ and $k_1=12$, are
consistent with this conjecture.  However, it came as a huge surprise
that the conjecture is false in general!

Frank Calegari and Kevin Buzzard \cite{buzzard-calegari:gm} found the
first counterexample, when $p=59$, $k_1=16$, $\alpha=1$, and
$k_2=16+59\cdot 58=3438$.  We have $d(16,0,59)=0$, $d(16,1,59)=1$,
and $d(16,\alpha,59)=0$ for all other $\alpha$.  However, initial
computations strongly suggest (but do not prove!) that
$d(3438,1,59)=2$.  It is a finite, but
difficult, computation to decide what $d(3438,1,59)$ really is
(see Section~\ref{sec:charpoly_alg}).  Using
a trace formula, Calegari and Buzzard at least showed that either
$d(3438,1,59)\geq 2$ or there exists $\alpha<1$ such that
$d(3438,\alpha,59)>0$, both of which contradict
Conjecture~\ref{conj:gm}.
 

There are many theorems about more general formulations of the
Gouvea-Mazur conjecture, and a whole geometric theory ``the
Eigencurve'' \cite{eigencurve} that helps explain it, but
discussing this further is beyond the scope of this book.

\section{An Algorithm for computing characteristic
polynomials of Hecke operators}\label{sec:charpoly_alg}
\newcommand{\be}{\mathbf{e}}

In computational investigations, it is frequently useful to compute
the characteristic polynomial of the Hecke operator $T_{p,k}$ of $T_p$
acting on $S_k(1)$.  This can be accomplished in several ways, each of
which has advantages.  The Eichler-Selberg trace formula (see Zagier's
appendix to \cite[Ch.~III]{lang:modular}), can be used to compute the
trace of $T_{n,k}$, for $n=1, p, p^2, \ldots, p^{d-1}$, where $d=\dim
S_k(1)$, and from these traces it is straightforward to recover the
characteristic polynomial of $T_{p,k}$.  Using the trace formula, the
time required to compute $\Tr(T_{n,k})$ grows ``very quickly'' in~$n$
(though {\em not} in~$k$), so this method becomes unsuitable when the
dimension is large or~$p$ is large, since $p^{d-1}$ is huge.  Another
alternative is to use modular symbols of weight~$k$, as in
\cite{merel:1585}, but if one is only interested in characteristic
polynomials, little is gained over more naive methods (modular symbols
are most useful for investigating special values of $L$-functions).

In this section, we describe an algorithm to compute the
characteristic polynomial of the Hecke operator $T_{p,k}$, which
is adapted for the case when~$p>2$. It could be generalized to
modular forms for $\Gamma_1(N)$, given a method to compute a basis
of $q$-expansions to ``low precision'' for the space of modular
forms of weight~$k$ and level~$N$.  By ``low precision'' we mean
to precision $O(q^{dp+1})$, where $T_1,T_2,\ldots, T_d$ generate
the Hecke algebra $\T$ as a ring.  The algorithm described here
uses nothing more than the basics of modular forms and some linear
algebra; in particular, no trace formulas or modular symbols are
involved.

\subsection{Review of basic facts about modular forms}
We briefly recall the background for this section.  Fix an even
integer~$k$.  Let $M_k(1)$ denote the space of weight~$k$ modular
forms for $\SL_2(\Z)$ and $S_k(1)$ the subspace of cusp forms.
Thus $M_k(1)$ is a $\C$-vector space that is equipped with a ring
$$\T=\Z[\ldots T_{p,k} \ldots] \subset \End(M_k(1))$$ of Hecke
operators.  Moreover, there is an injective $q$-expansion map
$M_k(1)\hookrightarrow \C[[q]]$.  For example, when $k \geq 4$
there is an Eisenstein series $E_k$, which lies in $M_k(1)$. The
first two Eisenstein series are
$$
E_4(q) = \frac{1}{240} + \sum_{n\geq 1} \sigma_3(n) q^n \,\,\text{
and }\,\, E_6(q) = \frac{1}{504} + \sum_{n\geq 1} \sigma_5(n) q^n,
$$
where $q=e^{2\pi{}iz}$, $\sigma_{k-1}(n)$ is the sum of the
$k-1$st power of the positive divisors.  For every prime
number~$p$, the {\em Hecke operator} $T_{p,k}$ acts on $M_k(1)$ by
\begin{equation}\label{eqn:def_tpk}
  T_{p,k}\left(\sum_{n\geq 0} a_n q^n\right)
   = \sum_{n\geq 0} a_{np}q^n + p^{k-1} a_n q^{np}.
\end{equation}
\begin{proposition}\label{prop:level1basis}
The set of modular forms $E_4^a E_6^b$ is a basis for $M_k(1)$,
where~$a$ and~$b$ range through nonnegative integers such that
$4a+6b=k$. Moreover, $S_k(1)$ is the subspace of $M_k(1)$ of
elements whose $q$-expansions have constant coefficient~$0$.
\end{proposition}

\subsection{The Naive approach}
Let~$k$ be an even positive integer and~$p$ be a prime.  Our goal
is to compute the characteristic polynomial of the Hecke operator
$T_{p,k}$ acting on $S_k(1)$.  In practice, when~$k$ and~$p$ are
both reasonably large, e.g., $k=886$ and $p=59$, then the
coefficients of the characteristic polynomial are huge (the roots
of the characteristic polynomial are $O(p^{k/2-1})$).  A naive way
to compute the characteristic polynomial of $T_{p,k}$ is to use
(\ref{eqn:def_tpk}) to compute the matrix $[T_{p,k}]$ of $T_{p,k}$
on the basis of Proposition~\ref{prop:level1basis}, where $E_4$ and
$E_6$ are computed to precision $p \dim M_k(1)$, and to then
compute the characteristic polynomial of $[T_{p,k}]$ using, e.g.,
a modular algorithm (compute the characteristic polynomial modulo
many primes, and use the Chinese Remainder Theorem). The
difficulty with this approach is that the coefficients of the
$q$-expansions of $E_4^a E_6^b$ to precision $p\dim M_k(1)$
quickly become enormous, so both storing them and computing with
them is costly, and the components of $[T_{p,k}]$ are also huge so
the characteristic polynomial is difficult to compute. See
Example~\ref{ex:k36} above, where the coefficients of the
$q$-expansions are already large.

\subsection{The Eigenform method}
We now describe another approach to computing characteristic
polynomials, which gets just the information required. Recall
Maeda's conjecture from Section~\ref{sec:maeda_conj}, which
asserts that $S_k(1)$ is spanned by the
$\Gal(\Qbar/\Q)$-conjugates of a single eigenform $f=\sum b_n
q^n$.  For simplicity of exposition below, we assume this
conjecture, though the algorithm can probably be modified to deal
with the general case.  We will refer to this eigenform~$f$, which
is well-defined up to $\Gal(\Qbar/\Q)$-conjugacy, as {\em Maeda's
eigenform}.

\begin{lemma} The characteristic polynomial of the $p$th coefficient $b_p$ of Maeda's
eigenform~$f$, in the field $\Q(b_1,b_2,\ldots)$, is equal to the characteristic
polynomial of $T_{p,k}$ acting on $S_k(1)$.
\end{lemma}
\begin{proof}
The map $\T\tensor\Q\to\Q(b_1,b_2,\ldots)$ that sends $T_n\to b_n$
is an isomorphism of $\Q$-algebras.
\end{proof}

Victor Miller shows in his thesis that $S_k(1)$ has a unique basis
$f_1, \ldots, f_d\in \Z[[q]]$ with $a_i(f_j)=\delta_{ij}$, i.e.,
the first $d\times d$ block of coefficients is the identity
matrix. Again, in the general case, the requirement that there is
such a basis can be avoided, but for simplicity of exposition we
assume there is such a basis. We refer to the basis $f_1, \ldots,
f_d$ as {\em Miller's basis}.

\begin{algorithm}
We assume in the algorithm that the characteristic polynomial
of~$T_2$ has no multiple roots (this is easy to check, and if
false, then you have found an interesting counterexample to the
conjecture that the characteristic polynomial of $T_2$ has Galois
group the full symmetric group).
\begin{enumerate}
\item Using Proposition~\ref{prop:level1basis} and Gauss elimination,
we compute Miller's basis $f_1,\ldots, f_d$ to precision $O(q^{2d+1})$,
where $d=\dim S_k(1)$.  This is exactly the precision needed to compute
the matrix of $T_2$.
\item Using Definition~\ref{eqn:def_tpk}, we compute the matrix
  $[T_2]$ of $T_2$ with respect to Miller's basis $f_1,\ldots, f_d$.
We compute the matrix with respect to the Miller basis mainly because
it makes the linear algebra much simpler.
\item  Using Algorithm~\ref{alg:eigenvector} below we
write down an eigenvector $\e=(e_1,\ldots,e_d)\in K^d$ for $[T_2]$.
In practice, the components of $T_2$ are not very large,  so the numbers involved
in computing~$\be$ are also not very large.%
\item Since $e_1 f_1 + \cdots+ e_d f_d$ is an eigenvector for
$T_2$, our assumption that the characteristic polynomial of $T_2$
is square free (and the fact that $\T$ is commutative) implies
that $e_1 f_1 + \cdots + e_d f_d$ is also an eigenvector for
$T_p$. Normalizing, we see that up to Galois conjugacy,
\[
   b_p = \sum_{i=1}^d  \frac{e_i}{e_1}\cdot a_p(f_i),
\]
where the $b_p$ are the coefficients of Maeda's eigenform~$f$. For
example, since the $f_i$ are Miller's basis, if $p\leq d$ then
\[
b_p = \frac{e_p}{e_1}\qquad\text{if $p\leq d$},
\]
since $a_p(f_i)=0$ for all $i\neq p$ and $a_p(f_p)=1$. 
\item Finally, once we
have computed $b_p$, we can compute the characteristic polynomial
of $T_p$, because it is the minimal polynomial of $b_p$.  We spend
the rest of this section discussing how to make this step
practical.
\end{enumerate}
\end{algorithm}

Computing $b_p$ directly in step 4 is extremely costly because the
divisions $e_i/e_1$ lead to massive coefficient explosion, and the
same remark applies to computing the minimal polynomial of $b_p$.
Instead we compute the reductions $\overline{b}_p$ modulo~$\ell$
and the  characteristic polynomial of $\overline{b}_p$
modulo~$\ell$ for many primes~$\ell$, then recover {\em only} the
characteristic polynomial of $b_p$ using the Chinese Remainder
Theorem. Deligne's bound on the magnitude of Fourier coefficients
tells us how many primes we need as moduli (we leave this
analysis to the reader)\edit{Say more later.}.

More precisely, the reduction modulo~$\ell$ steps are as follows.
The field~$K$ can be viewed as $\Q[x]/(f(x))$ where $f(x)\in
\Z[x]$ is the characteristic polynomial of $T_2$.  We work only
modulo primes such that
\begin{enumerate}
\item $f(x)$ has no repeated roots modulo~$\ell$,%
\item $\ell$ does not divide any denominator involved in our
representation of $\be$, and%
\item the image of $e_1$ in $\F_\ell[x]/(f(x))$ is invertible.
\end{enumerate}
For each such prime, we compute the image $\overline{b}_p$ of
$b_p$ in the reduced Artin ring $\F_\ell[x]/(f(x))$.  Then the
characteristic polynomial of $T_p$ modulo~$\ell$ equals the
characteristic polynomial of $\overline{b}_p$.  This modular
arithmetic is fast and requires negligible storage.  Most of the
time is spent doing the Chinese Remainder Theorem computations,
which we do each time we do a few computations of the
characteristic polynomial of $T_p$ modulo $\ell$.


\begin{remark}
If $k$ is really large, so that steps 1 and 2 of the algorithm
take too long or require too much memory, steps 1 and 2 can be
performed modulo the prime~$\ell$.  Since the characteristic
polynomial of $T_{p,k}$ modulo~$\ell$ does not depend on any
choices, we will still be able to recover the original
characteristic polynomial.
\end{remark}

\subsection{How to write down an eigenvector over an extension field}
The following algorithm, which was suggested to the author
by H.~Lenstra, produces an eigenvector defined over an
extension of the base field.

\begin{algorithm}\label{alg:eigenvector}
Let~$A$ be an $n\times n$ matrix over an arbitrary field~$k$ and
suppose that the characteristic polynomial $f(x)=x^n+\cdots+a_1 x + a_0$
of~$A$ is irreducible.   Let~$\alpha$ be a root of $f(x)$
in an algebraic closure~$\kbar$ of~$k$.
Factor $f(x)$ over $k(\alp)$ as
 $f(x) = (x-\alp) g(x)$.
Then for any element $v\in k^n$ the vector
$g(A)v$ is either $0$ or it is an eigenvector of~$A$ with eigenvalue~$\alp$.
The vector $g(A)v$ can be computed by finding
$Av$, $A(Av)$, $A(A(Av))$, and then using that
  $$g(x)=x^{n-1}+c_{n-2} x^{n-2}+\cdots+c_1 x+ c_0,$$
where the coefficients $c_i$ are determined by the recurrence
$$c_0 = - \frac{a_0}{\alp},\qquad  c_i = \frac{c_{i-1}-a_i}{\alp}.$$

We prove below that $g(A)v\neq 0$ for all vectors~$v$ not
in a proper subspace of $k^n$.  Thus with high probability, a
``randomly chosen''~$v$ will have the property that $g(A)v\neq 0$.
Alternatively, if $v_1,\ldots v_n$ form a basis for $k^n$, then
$g(A)v_i$ must be nonzero for some~$i$.
\end{algorithm}
\begin{proof}
By the Cayley-Hamilton theorem \cite[XIV.3]{lang:algebra} we have
that $f(A)=0$.  Consequently, for any $v\in k^n$, we have
$(A-\alp)g(A)v=0$ so that $A g(A)v = \alp v$. Since~$f$ is
irreducible it is the polynomial of least degree satisfied by~$A$
and so $g(A)\neq 0$. Therefore $g(A)v\neq 0$ for all $v$ not in
the proper closed subspace $\ker(g(A))$.
\end{proof}

\subsection{Simple example: weight $36$, $p=3$}
We compute the characteristic polynomial of $T_3$ acting on
$S_{36}(1)$ using the algorithm described above.  A basis for
$M_{36}(1)$ to precision $6=2\dim(S_{36}(1))$ is
\begin{align*}
 E_4^9 &=
1 + 2160q + 2093040q^2 + 1198601280q^3 + 449674832880q^4 \\&\qquad +115759487504160q^5 + 20820305837344320q^6 +
    O(q^7)\\
E_4^6 E_6^2 &= 1 + 432q - 353808q^2 - 257501376q^3 - 19281363984q^4 \\&\qquad +28393576094880q^5 + 11565037898063424q^6 + O(q^7)
\\
E_4^3 E_6^4 &= 1 - 1296q + 185328q^2 + 292977216q^3 - 52881093648q^4 \\&\qquad- 31765004621280q^5 + 1611326503499328q^6 + O(q^7)\\
E_6^6 &=1 - 3024q + 3710448q^2 - 2309743296q^3 + 720379829232q^4 \\&\qquad- 77533149038688q^5 - 8759475843314112q^6 +
    O(q^7)
\end{align*}
The reduced row-echelon form (Miller) basis is:
\begin{align*}
f_0 &= 1 + 6218175600q^4 + 15281788354560q^5 + 9026867482214400q^6 + O(q^7)\\
f_1 &= q + 57093088q^4 + 37927345230q^5 + 5681332472832q^6 + O(q^7)\\
f_2 &= q^2 + 194184q^4 + 7442432q^5 - 197264484q^6 + O(q^7)\\
f_3 &= q^3 - 72q^4 + 2484q^5 - 54528q^6 + O(q^7)
\end{align*}
The matrix of $T_2$ with respect to the basis $f_1,f_2,f_3$ is
\[
[T_2] =
\mthree{\,0}{\hfill   34416831456 }{\hfill 5681332472832}
{\, 1   }{  \hfill   194184 }{\hfill   -197264484}
{  \, 0  }{   \hfill      -72  }{\hfill      -54528}
\]
This matrix has (irreducible) characteristic polynomial
\[
   g = x^3 - 139656x^2 - 59208339456x - 1467625047588864.
\]
If $a$ is a root of this polynomial, then one finds that
\[
\be = (
2a + 108984,\quad
2a^2 + 108984a,\quad
a^2 - 394723152a + 11328248114208)
\]
is an eigenvector with eigenvalue~$a$. The characteristic
polynomial of $T_3$ is then the characteristic polynomial of
$e_3/e_1$, which we can compute modulo~$\ell$ for any prime~$\ell$
such that $\overline{g}\in\Fell[x]$ is square free. For example,
when $\ell=11$,
\[
  \frac{e_3}{e_1} = \frac{a^2 + a + 3}{2a^2+7} = 9a^2 + 2a + 3,
\]
which has characteristic polynomial
\[
x^3 + 10x^2 + 8x + 2.
\]
If we repeat this process for enough primes~$\ell$ and use the
Chinese remainder theorem, we find that the characteristic
polynomial of $T_3$ acting on $S_{36}(1)$ is
\[
x^3 + 104875308x^2 - 144593891972573904x -
21175292105104984004394432.
\]


\comment{
\section{Katz  modular forms} In Katz's paper
\cite[\S1.1]{katz:antwerp350}, he gives a purely algebraic
definition of modular forms, which generalizes viewing modular
forms as functions on pairs $(E,\omega)$, and makes sense over an
arbitrary base ring.

An elliptic curve~$E$ over a commutative ring~$R$ is a smooth
proper morphism $p:E\to \Spec(R)$, with geometric fibers genus one
curves, along with a section $e:\Spec(R)\to E$.   Let $\cE$ be the
set of isomorphism classes of pairs $(E/R,\omega)$, where $E$ is
an elliptic curve over a ring~$R$ and~$\omega$ is a basis for
$\H^0(E,\Omega^1_{E/R})$ (i.e., a differential that does not
vanish on any fiber).

\begin{definition}[Katz Modular Forms]
A {\em modular form of weight~$k$} is a rule that assigns to any
$(E/R,\omega)$ an element $f(E/R,\omega)\in R$ such that
\begin{enumerate}
\item {\bf Well defined:} $f$ only depends on the isomorphism class of $(E/R,\omega)$.%
\item {\bf Homogeniety:} For any $\lambda\in R^*$, we have
$f(E,\lambda\omega) = \lambda^{-k} f(E,\omega)$.%
\item {\bf Base change:} If $g:R\to R'$ is a homomorphism, then
$f(E_{R'}/R',\omega_{R'}) = g(f(E/R,\omega))$.
\end{enumerate}
If in this definition we fix $R$ and only consider $R'$ equipped
with a morphism $g:R\to R'$, then $f$ is a {\em modular form
over~$R$} of weight~$k$.
\end{definition}

Note that there is no condition of holomorphicity at infinity in
this definition.  To define $q$-expansions and what it means to be
holomorphic at infinity in this generality requires the Tate
curve, which we have not introduced yet.  [See ...]

If $R=\F_p$, there are two possible notions of weight~$k$ modular
forms mod~$p$.  First, one could take a basis for $M_k(1)\cap
\Z[[q]]$ and reduce modulo~$p$.  Alternatively, one could consider
holomorphic Katz modular forms over $\F_p$.   Katz proves
\cite[Thm.~1.8.2]{katz:antwerp350} that if $p\geq 5$, then these
two notions agree, but when $p=2, 3$ (and $k=p-1$), they do not.
The extra Katz modular forms for $p=2,3$ are the Hasse invariant
in characteristics $p=2,3$, which has weight $p-1$.  These are
extra forms because $\dim M_k(1)=0$ for $k=1,2$. }

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "main"
%%% End: 
% c3.tex

\chapter{Duality, Rationality, and Integrality}

\section{Modular forms for $\sltwoz$ and Eisenstein series}\label{sec:sl2eis}
Let $\Gamma=\Gamma_1(1)=\sltwoz$ and for $k\geq 0$ 
let 
\begin{align*}
M_k&=\left\{f=\sum_{n=0}^{\infty}a_n q^n : \text{$f$ is a modular form
of weight $k$ for $\Gamma$}\right\}\\
&\supset S_k=\left\{f=\sum_{n=1}^{\infty}a_n q^n : f \in M_k\right\}\end{align*}
These are finite dimensional $\bC$-vector spaces whose dimensions
are easily computed. Furthermore, they are generated by familiar elements
(see Serre \cite{serre:arithmetic} or Lang \cite{lang:modular}.)
\index{Serre}\index{Lang}
The main tool is the formula
$$\sum_{p\in D\union\{\infty\}} \frac{1}{e(p)}\ord_p(f) = \frac{k}{12}$$
where $D$ is the standard fundamental domain for $\Gamma$ and
$$e(p)=\begin{cases} 1&\text{otherwise}\\
                     2&\text{if $p=i$}\\
                     3&\text{if $p=\rho=e^{2\pi i/3}$}
      \end{cases}$$
One can alternatively define $e(p)$
as follows. If $p=\tau$ and $E=\bC/(\bZ\tau+\bZ)$
then $e(p)=\frac{1}{2}\#\Aut(E)$.

For $k\geq 4$ we define the {\em Eisenstein series}\index{Eisenstein series} $G_k$ by
$$G_k(q)=\frac{1}{2}\zeta(1-k)+\sum_{n=1}^{\infty}\sigma_{k-1}(n)q^n.$$
The map
$$\tau\mapsto\sum_{\substack{(m,n)\neq(0,0)\\m,n\in\bZ}}
\frac{1}{(m\tau+n)^k}$$
differs from $G_k$ by a constant (see \cite[\S{}VII.4.2]{serre:arithmetic}).
Also, $\zeta(1-k)\in\bQ$ and one may say, {\em symbolically} at least,
``$\displaystyle \zeta(1-k)=\sum_{d=1}^{\infty} d^{k-1} = 
\sigma_{k-1}(0)$.''
The {\em $n$th Bernoulli number $B_n$} is defined by the equation
$$\frac{x}{e^x-1}=\sum_{n=0}^{\infty} \frac{B_nx^n}{n!}.$$
One can show, using the functional equation for $\zeta$ and
\cite[\S{}VII.4.1]{serre:arithmetic}, that $\zeta(1-k)=-\frac{B_k}{k}$ so
the constant coefficient of $G_k$ is $-\frac{B_k}{2k}$ which is
rational.

\section{Pairings between Hecke algebras and modular forms}\label{sec:pairing1}\index{pairings}
In what follows we assume $k\geq 2$ to avoid trivialities.. 
The Hecke operators $T_n$ acts on the space $M_k$. Fix a 
subspace $V\subset M_k$ which is stable under the action
of the $T_n$. Let $\T=\T_{\C}(V)=\C[\ldots, (T_n)_{|V},\ldots]$ 
be the $\bC$-algebra generated by
the endomorphism $T_n$ acting on $V$ and note that $\T(V)$
is a finite dimensional $\bC$-vector space since it
is a subspace of $\End(V)$ and $V$ is finite dimensional.  Recall
that $\T$ is commutative.

For any Hecke operator $T \in\T$ and $f\in V$, to make certain
arguments notationally more natural, we will often write $T(f) = f|T$.
The ring $\T$ is commutative, so it is harmless to use this notation,
which suggests both a left and right module structure.

Let $\T=\T_\C(V)$, and 
define the bilinear pairing
\begin{align*}
V\times \T &\into \bC \\
\langle f,T\rangle & = a_1(f|T)
\end{align*}
where $f|T=\sum_{n=0}^{\infty}a_n(f|T)q^n$. 
We thus obtain maps 
\begin{align*}
V\into\Hom(\T,\bC)=\T^{*}\\
\T\into \Hom(V,\bC)=V^{*}.
\end{align*}

\begin{theorem}
The above maps are isomorphisms.
\end{theorem}
\begin{proof}
It suffices to show that each map is injective. 
Then since a finite dimensional
vector space and its dual have the same dimension the result follows.
First suppose $f\mapsto 0\in\Hom(\T,\bC)$.  Then 
$a_1(f|T)=0$ for all $T\in\T$, so
$a_n=a_1(f|T_n)=0$ for all $n\geq 1$. Thus $f$ is a constant;
since $k\geq 2$ this implies $f=0$. %hmwk

Next suppose $T\mapsto 0\in \Hom(V,\bC)$, then 
$a_1(f|T)=0$ for all $f\in V$. Substituting $f|T_n$ for
$f$ and using the commutativity of $\T$ we have
\begin{align*}
a_1((f|T_n)|T)&=0 && \text{for all $f$, $n\geq 1$}\\
a_1((f|T)|T_n)&=0 && \text{by commutativity}\\
a_n(f|T)&=0 && \text{$n\geq 1$}\\
f|T&=0 && \text{since $k\geq 2$, as above}
\end{align*}
Thus $T=0$ which completes the proof.
\end{proof}

\begin{remark}
The above isomorphisms are {\em $\T$-equivariant}, in the
following sense. 
We endow $\Hom(\T,\bC)$ with a $\T$-module structure by letting $T\in\T$ act
on $\varphi\in\Hom(\T,\bC)$ by 
$(T\cdot\varphi)(T')=\varphi(TT')$. If $\alpha:V\into\Hom(\T,\bC)$
is the above isomorphism 
(so $\alpha:f\mapsto\varphi_f:=(T'\mapsto a_1(f|T'))$),
then equivariance is the statement that $\alpha(Tf)=T\alpha(f).$ 
This follows since 
\begin{align*}
\alpha(Tf)(T')&=\varphi_{Tf}(T')=a_1(Tf|T')=a_1(f|T'T)\\
&=\varphi_{f}(T'T)=T\varphi_{f}(T')=T\alpha(f)(T').
\end{align*}
Similar remarks hold for $T\to V^*$.
\end{remark}

\section{Eigenforms}
\index{eigenforms}
We continue to assume that $k\geq 2$. 
\begin{defn}
A modular form $f\in M_k$ is an {\em eigenform for $\T$} if
$f|T_n=\lambda_n f$ for all $n\geq 1$ and some complex numbers $\lambda_n$.
\end{defn}
Suppose $f$ is an eigenform, so
$a_n(f)=a_1(f|T_n)=\lambda_n a_1(f)$.
Thus if $a_1(f)=0$, then $a_n(f)=0$ for all $n\geq 1$, so
since $k\geq 2$ this implies that $f=0$. Thus $a_1(f)\neq 0$,
and we may as well divide through by $a_1(f)$ to obtain
the {\em normalized eigenform} $\frac{1}{a_1(f)}f$. We thus
assume that $a_1(f)=1$, then the formula becomes $a_n(f)=\lambda_n$,
so $f|T_n = a_n(f) f$, for all $n\geq 1$. 

\begin{theorem}
Let $f\in V$ and let $\psi$ be the image of~$f$ 
in $\Hom(\T,\bC)$, so $\psi(T)=a_1(f|T)$. 
Then~$f$ is a normalized eigenform if and only if~$\psi$ is a 
ring homomorphism.
\end{theorem}

\begin{proof} 
First suppose $f$ is a normalized eigenform, so $f|T_n=a_n(f)f$.
Then 
\begin{align*}
\psi(T_nT_m) &=a_1(f|T_nT_m)=a_m(f|T_n)\\
             &=a_m(a_n(f)f)=a_m(f)a_n(f)\\
             &=\psi(T_n)\psi(T_m),
\end{align*}
so $\psi$ is a homomorphism.

Conversely, assume $\psi$ is a homomorphism. Then 
$f|T_n=\sum a_m(f|T_n)q^m$, so to show that $f|T_n=a_n(f)f$ 
we must show that $a_m(f|T_n)=a_n(f)a_m(f)$. Recall that %% remark 3.3
$\psi(T_n)=a_1(f|T_n)=a_n$, so
\begin{align*}
a_n(f)a_m(f) &= a_1(f|T_n)a_1(f|T_m) = \psi(T_n)\psi(T_m) \\
             & = \psi(T_n T_m) = a_1(f|T_n|T_m) \\
             & = a_m(f| T_n)
\end{align*}
as desired.

\end{proof}




\section{Integrality}
In the previous sections, we looked at subspaces
$V \subset M_k \subset \bC[[q]]$, with $k\geq 2$, and considered the
space $\T=\T(V)=\bC[\ldots,T_n,\ldots]\subset\End_{\C}V$
of Hecke operators on $V$. We defined a pairing
$\T\cross V\into \bC$ by $(T,f)\mapsto a_1(f|T)$ and
showed this pairing is nondegenerate and that
it induces isomorphisms
$\T\isom\Hom(V,\bC)$ and $V\isom\Hom(\T,\bC)$. 


Fix $k\geq 4$ and let $S=S_k$ be the space of weight $k$
cusp forms with respect to the action of $\sltwoz$. Let
\begin{align*}
S(\bQ)& =S_k\intersect \bQ[[q]]\\
S(\bZ)& = S_k\intersect \bZ[[q]].
\end{align*}

\begin{theorem}\label{thm:Mkinteger}
There is a $\bC$-basis of $M_k$ consisting of forms
with integer coefficients. 
\end{theorem}
\begin{proof}
We see this by 
exhibiting a basis. Recall that for all $k\geq 4$ 
$$G_k=-\frac{B_k}{2k}+\sum_{k=1}^{\infty}\sum_{d|k}d^{k-1}q^n$$
is the $k$th Eisenstein series\index{Eisenstein series},
which is a modular form of weight $k$, and 
$$E_k=-\frac{2k}{B_k}\cdot G_k=1+\cdots$$
is the normalization that starts with $1$. Since the Bernoulli numbers
$B_2,\ldots,B_8$ have $1$ as numerator (this isn't always the case,
$B_{10}=\frac{5}{66}$) we see that $E_4$ and $E_6$ have coefficients
in $\bZ$ and constant term $1$. Furthermore one shows (see 
\cite[\S{}VII.3.2]{serre:arithmetic}) by dimension and
independence arguments that the modular forms
$$\{E_4^aE_6^b \, :\, 4a+6b=k\}$$
form a basis for $M_k$.
\end{proof}

\section{A Result from Victor Miller's thesis}
Set $d=\dim_{\C}S_k$. Victor Miller showed in his thesis (see
\cite{lang:modular}, Ch.~X, Theorem~4.4) that there exists
$$f_1,\ldots,f_d\in S_k(\bZ) \quad\text{such that}\quad a_i(f_j)=\delta_{ij}$$
for $1\leq i,j\leq d$. The $f_i$ then form a basis
for $S_k(\bZ)$.

\begin{example}
The space $S_{36}(\bZ)$ has basis
\begin{align*}
f_1 &= q + 57093088q^4 + 37927345230q^5 + 5681332472832q^6 +  \cdots\\
f_2 &= q^2 + 194184q^4 + 7442432q^5 - 197264484q^6 + 722386944q^7  \cdots\\
f_3 &= q^3 - 72q^4 + 2484q^5 - 54528q^6 + 852426q^7 - 10055232q^8 +  \cdots
\end{align*}
\end{example}

Let $\T=\bZ[\ldots,T_n,\ldots]\subset \End(S_k)$ be
the Hecke algebra associated to~$S_k$.
Miller's thesis implies the following result about $\T$.
\begin{proposition}
We have $\T=\bigoplus_{i=1}^{d} \bZ T_i$, as $\bZ$-modules.
\end{proposition}

\begin{proof}
To see that $T_1,\ldots,T_d\in \T=\T(S_k)$ 
are linearly independent over $\bC$, suppose
$\sum_{i=1}^{d} c_i T_i = 0$. 
Then
$$0=a_1\left(f_j|\sum c_i T_i\right)=\sum_{i}c_i a_i(f_j) = 
\sum_{i} c_i \delta_{ij} = c_j.$$ From the isomorphism
$\T\isom\Hom(S_k,\bC)$ we know that $\dim_{\C}\T=d$,
so we can write any $T_n$ as a $\bC$-linear combination 
$$T_n=\sum_{i=1}^{d}c_{n_i}T_i,\quad c_{n_i}\in\bC.$$ 
But 
$$\bZ\ni a_n(f_j)=a_1(f_j|T_n)=\sum_{i=1}^{d}c_{n_i}a_1(f_j|T_i)
=\sum_{i=1}^{d}c_{n_i}a_i(f_j) = c_{n_j}$$
so the $c_{n_i}$ all lie in $\bZ$, which completes the proof.
\end{proof}

Thus $\T$ is an integral Hecke algebra of finite rank $d$ over $\bZ$. 
We have a map 
\begin{align*}
S(\bZ)\cross \T & \into \bZ \\
(f,T) & \mapsto a_1(f|T)
\end{align*}
which induces an embedding
$$S(\bZ)\hookrightarrow\Hom(\T,\bZ)\ncisom \bZ^d.$$

\begin{remark}
The map $S(\bZ)\hookrightarrow\Hom(\T,\bZ)$ is
an isomorphism of $\T$-modules, since
if $\vphi\in\Hom(\T,\bZ)$,
then $f=\sum_{j=1}^d \vphi(T_j) f_j\in S(\bZ)$ maps to $\vphi$.
\end{remark}

\section{The Petersson inner product}\index{inner product}\label{sec:petersson}

The main theorem is
\begin{theorem}
The $T_n\in\T(S_k)$ are all diagonalizable over $\bC$. 
\end{theorem}

To prove this, we note that $S_k$ supports a nondegenerate positive definite
Hermitean inner product (the Petersson inner product)
$$(f,g)\mapsto\langle f,g\rangle\in\bC$$
such that 
\begin{equation}\label{eqn:Tnhermitean}
\langle f|T_n,g\rangle =\langle f,g|T_n\rangle.
\end{equation}
We need some background facts.

\begin{defn}
An operator $T$ is {\em normal} if it commutes with its adjoint, thus
$TT^{*}=T^{*}T$.
\end{defn}
It follows from \eqref{eqn:Tnhermitean} that $T_n^{*}=T_n$,
so $T_n$ is clearly normal. 
\begin{theorem}
A normal operator is diagonalizable.
\end{theorem}  
Thus each $T_n$ is diagonalizable.
\begin{theorem}
A commuting family of semisimple (=diagonalizable) operators
can be simultaneously diagonalized.
\end{theorem}
Since the $T_n$ commute this implies $S_k$ has a basis consisting
of normalized eigenforms $f$. Their eigenvalues are real since
\begin{align}\label{eqn:real}
a_n(f)\langle f,f\rangle &=\langle a_n(f)f,f\rangle =\langle f|T_n,f\rangle\\
           &=\langle f,a_n(f)f\rangle =\overline{a_n(f)}\langle f,f\rangle.
\end{align}

\begin{proposition}\label{prop:totreal1}
  The coefficients $a_n$ of the eigenforms are totally real algebraic
  integers.
\end{proposition}
\begin{proof}
  Theorem~\ref{thm:Mkinteger} implies that there is a basis for $S_k$
  with integer coefficients.  With respect to a basis for $S_k(\Z) =
  S_k\cap \ZZ[[q]]$, the matrices of the Hecke opeators $T_n$ all have
  integer entries, so their characteristic polynomials are monic
  polynomials with integer coefficients.  The roots of these
  polynomials are all real (by \eqref{eqn:real}), so the roots are
  totally real algebraic integers.
% The space $S_k$ is stable under the action of $\Aut(\bC)$ on 
% coefficients: if $f=\sum_{n=1}^{\infty}c_n q^n\in S_k$ and 
% $\sigma\in\Aut(\bC)$ then $\sigma(f)=\sum_{n=1}^{\infty}\sigma(c_n)q^n$
% is again in $S_k$ (check this by writing $f$ in terms of a basis
% $f_1,\ldots,f_d\in S(\bZ)$). Next use that $f$ is an eigenform
% if and only if $\sigma(f)$ is an eigenform.]  
\end{proof}

Let 
$$\sH=\{x+iy : x, y\in \bR, \text{ and } y>0\}$$
be the upper half plane. 

If $\alpha=\abcd\in\GL_2^{+}(\bR)$ then $\abcd$ acts on $\sH$ by
$$\bigabcd:\quad z\mapsto\frac{az+b}{cz+d}.$$
\begin{lemma}\label{lem:imaglft}
$$\imag\left(\frac{az+b}{cz+d}\right)=\frac{\det(\alpha)}{|cz+d|^2}y.$$
\end{lemma}
\begin{proof}
Apply the identity $\Im(w) = \frac{1}{2i}(w-\overline{w})$ to the
left hand side and simplify.
\end{proof}

\begin{proposition}
The volume form
$\frac{dx\wedge dy}{y^2}$ is invariant under the action of
$$\GL_2^{+}(\bR)=\{\alpha \in\GL_2(\bR) \,:\, \det(\alpha)>0\}.$$
\end{proposition}
\begin{proof}
Differentiating $\alpha=\frac{az+b}{cz+d}$ gives
\begin{align*}
d\left(\frac{az+b}{cz+d}\right)&=
\frac{a(cz+d)dz-c(az+b)dz}{(cz+d)^2}\\
&=\frac{(ad-bc)dz}{(cz+d)^2}\\
&= \frac{\det(\alpha)}{(cz+d)^2}dz
\end{align*}
Thus, under the action of $\alpha$, $dz\wedge d{\overline z}$
takes on a factor of 
$$\frac{\det(\alpha)^2}{(cz+d)^2(c\overline{z}+d)^2}
=\Bigl(\frac{\det(\alpha)}{|cz+d|^2}\Bigr)^2.$$
\end{proof}

\begin{defn}
The {\em Petersson inner product} of forms $f,g\in S_k$ is defined by
$$\langle f,g\rangle =\int_{\Gamma\backslash\sH}(f(z)\overline{g(z)}y^k)
\frac{dx\wedge dy}{y^2},$$
where $\Gamma=\sltwoz$. 
\end{defn}

Integrating over $\Gamma\backslash\sH$ can be taken to mean integrating
over a fundamental domain for the action of $\sH$. Showing that the
operators $T_n$ are self-adjoint with respect to the Petersson inner
product is a harder computation than one might think (see 
\cite[\S{}III.4]{lang:modular}).


\chapter{Analytic Theory of Modular Curves}\label{sec:anmodcurve}

\section{The Modular group}

This section very closely follows Sections 1.1--1.2 of
\cite{serre:arithmetic}.  We introduce the modular group
$G=\PSL_2(\Z)$, describe a fundamental domain for the action of
$G$ on the upper half plane, and use it to prove that $G$ is
generated by
$$
   S=\mtwo{0}{-1}{1}{0}\quad\text{and}\quad T=\mtwo{1}{1}{0}{1}.
$$

\subsection{The Upper half plane}
\begin{figure}
\begin{center}
\includegraphics[width=0.80\textwidth]{graphics/uhp}
\caption{The upper half plane $\h$}
\end{center}
\end{figure}
Let
\[
  \h = \{z\in\C \,:\, \Im(z) > 0\}
\]
be the open complex upper half plane. The group
\[
\SL_2(\R) = \left\{ \mtwo{a}{b}{c}{d} \,:\, a,b,c,d\in\R \text{
and } ad-bc = 1\right\}
\]
acts by linear fractional transformations ($z\mapsto
(az+b)/(cz+d)$) on $\C\union\{\infty\}$.  
Suppose $g\in\SL_2(\R)$ and $z\in\h$.  Then Lemma~\ref{lem:imaglft}
implies that
$
  \Im(gz) = \frac{\Im(z)}{|cz+d|^2},
$
so $\SL_2(\R)$ acts on $\h$.

The only element of $\SL_2(\R)$ that acts trivially on $\h$ is
$-1$, so $$G = \PSL_2(\Z) = \SL_2(\Z)/\langle -1 \rangle$$ acts
faithfully on~$\h$.  Let $S$ and $T$ be as above and note that $S$
and $T$ induce the linear fractional transformations $z\mapsto
-1/z$ and $z\mapsto z+1$, respectively.  In fact, $S$
and $T$ generate $G$.

\section{Points on modular curves parameterize elliptic curves with extra structure}\label{sec:modcurveparam}
The classical theory of the Weierstass $\wp$-function sets up a
bijection between isomorphism classes of elliptic curves over $\C$
and isomorphism classes of one-dimensional complex tori
$\C/\Lambda$.  Here~$\Lambda$ is a lattice in~$\C$, i.e., a free
abelian group $\Z\omega_1+\Z\omega_2$ of rank~$2$ such that
$\R\omega_1+\R\omega_2=\C$.

Any homomorphism $\vphi$ of complex tori $\C/\Lambda_1\to
\C/\Lambda_2$ is determined by a $\C$-linear map $T:\C\to \C$ that
sends $\Lambda_1$ into $\Lambda_2$.
\begin{lemma}\label{lem:ellcurvemapker} Suppose $\vphi:\C/\Lambda_1\to
\C/\Lambda_2$ is nonzero.  Then the kernel of $\vphi$ is
isomorphic to $\Lambda_2/T(\Lambda_1)$.
\end{lemma}
%\begin{proof}
%Use the snake lemma applied to the morphism from the short exact
%sequence $0\to \Lambda_1\to \C\to E_1\to 0$ to the short exact
%sequence $0\to \Lambda_2\to\C\to E_2\to 0$.
%\end{proof}



\begin{lemma}
Two complex tori $\C/\Lambda_1$ and $\C/\Lambda_2$ are isomorphic
if and only if there is a complex number~$\alpha$ such that
$\alpha \Lambda_1 = \Lambda_2$.
\end{lemma}
\begin{proof}
Any $\C$-linear map $\C\to\C$ is multiplication by a
scalar~$\alpha\in\C$.
\end{proof}

Suppose $\Lambda=\Z\omega_1 +\Z\omega_2$ is a lattice in $\C$, and
let $\tau=\omega_1/\omega_2$.  Then $\Lambda_{\tau} = \Z\tau + \Z$
defines an elliptic curve that is isomorphic to the elliptic curve
determined by $\Lambda$.  By replacing $\omega_1$ by $-\omega_1$,
if necessary, we may assume that $\tau\in\h$. Thus every elliptic
curve is of the form $E_{\tau} = \C/\Lambda_{\tau}$ for some
$\tau\in\h$ and each $\tau\in\h$ determines an elliptic curve.


\begin{proposition}\label{prop:sltwoorbits}
Suppose $\tau, \tau'\in\h$.  Then $E_\tau\ncisom E_{\tau'}$ if and
only if there exists $g\in\SL_2(\Z)$ such that $\tau=g(\tau')$.
Thus the set of isomorphism classes of elliptic curves over~$\C$
is in natural bijection with the orbit space
$\SL_2(\Z)\backslash\h$.
\end{proposition}
\begin{proof}
Suppose $E_\tau\ncisom E_{\tau'}$.  Then there exists $\alpha\in\C$
such that $\alpha\Lambda_\tau = \Lambda_{\tau'}$, so $\alpha\tau =
a\tau' + b$ and $\alpha 1 = c\tau' + d$ for some $a,b,c,d\in\Z$.
The matrix $g=\abcd$ has determinant $\pm 1$ since $a\tau'+b$ and
$c\tau'+d$ form a basis for $\Z\tau'+\Z$; this determinant is
positive because $g(\tau')=\tau$ and $\tau, \tau'\in\h$. Thus
$\det(g)=1$, so $g\in\SL_2(\Z)$.

Conversely, suppose $\tau,\tau'\in\h$ and $g=\abcd\in \SL_2(\Z)$
is such that $$\tau=g(\tau')=\frac{a\tau'+b}{c\tau'+d}.$$ Let
$\alpha = c\tau' + d$, so $\alpha\tau = a\tau'+b$.  Since
$\det(g)=1$, the scalar $\alpha$ defines an isomorphism from
$\Lambda_\tau$ to $\Lambda_{\tau'}$, so $E_\tau\ncisom E_\tau'$, as
claimed.
\end{proof}


Let $E=\C/\Lambda$ be an elliptic curve over~$\C$ and $N$ a
positive integer.  Using Lemma~\ref{lem:ellcurvemapker}, we see
that
\[
  E[N] := \{x \in E \,:\, Nx = 0\} \isom \left(\frac{1}{N}\Lambda\right) /
  \Lambda \isom (\Z/N\Z)^2.
\]
If $\Lambda=\Lambda_\tau = \Z\tau + \Z$, this means that $\tau/N$
and $1/N$ are a basis for $E[N]$.

Suppose $\tau\in\h$ and recall that $E_\tau = \C/\Lambda_\tau =
\C/(\Z\tau + \Z)$.  To $\tau$, we associate three ``level~$N$
structures''.  First, let $C_\tau$ be the subgroup of $E_\tau$
generated by $1/N$.  Second, let $P_\tau$ be the point of order
$N$ in $E_\tau$ defined by $1/N\in \frac{1}{N}\Lambda_\tau$.   Third, let
$Q_\tau$ be the point of order~$N$ in $E_\tau$ defined by
$\tau/N$, and consider the basis $(P_\tau,Q_\tau)$ for $E[N]$.

In order to describe the third level structure, we introduce the
{\em Weil pairing}
$$e:E[N]\times E[N]\to \Z/N\Z$$ as follows. If $E=\C/(\Z\omega_1+\Z\omega_2)$ with
$\tau = \omega_1/\omega_2\in\h$, and $P=a\omega_1/N + b\omega_2/N$,
$Q=c\omega_1/N + d\omega_2/N$, then $$e(P,Q) = ad-bc\in\Z/N\Z.$$
Note that $e$ does not depend on choice of basis
$\omega_1,\omega_2$ for $\Lambda$.
Also if
$\C/\Lambda\isom \C/\Lambda'$ via multiplication by~$\alpha$, and
$P,Q\in(\C/\Lambda)[N]$, then we have $e(\alpha(P),\alpha(Q)) = e(P,Q)$,
so $e$ does not depend on the choice of $\Lambda$.  
In particular, $P_{\tau}$ and $Q_{\tau}$ map to
$P,Q$ via the map $E_{\tau}\to E$ given by multiplication
by $\omega_2$, so $e(P_\tau,Q_\tau) = -1\in\Z/N\Z$.  

\begin{remark}
  There is a canonical $N$th root of 1 in $\C$, namely $\zeta =
  e^{2\pi i / N}$.  Using $\zeta$ as a canonical generator of $\mu_N$,
  we can view the transcendental Weil pairing indifferently as a map
  with values in $\Z/N\Z$ or as a map with values in $\mu_N$.
  However, for generalizations it is important to use $\mu_N$ rather
  than $\Z/N\Z$.  There are several intrinsic algebraic definitions of
  the Weil pairing on $N$-division points for an elliptic curve (or,
  more generally, an abelian variety) over a field $k$ whose
  characteristic is prime to $N$.  In all cases, the Weil pairing
  takes values in the group of $N$th roots of unity with values in the
  algebraic closure of $k$.  The various definitions all coincide ``up
  to sign'' in the sense that any two of them either coincide or are
  inverse to each other.  There are discussions of the Weil pairing in
  \cite[\S5.2]{katz:st-local_moduli} and \cite[III.8]{silverman:aec}.
  The Weil pairing is bilinear, alternating, non-degenerate, Galois
  invariant, and maps surjectively onto $\Mu_N$.
%\cite{mumford:abvars} and
\end{remark}

We next consider the three modular curves $X_0(N)$, $X_1(N)$, and
$X(N)$, associated to the congruence subgroups $\Gamma_0(N)$,
$\Gamma_1(N)$ and $\Gamma(N)$.  Recall that $\Gamma_0(N)$ is the
subgroup of $\mtwosmall{a}{b}{c}{d}\in\SL_2(\Z)$ congruent to
$\mtwosmall{*}{*}{0}{*}$ modulo $N$, that $\Gamma_1(N)$ consists of
matrices congruent to $\mtwosmall{1}{*}{0}{1}$ modulo $N$, and $\Gamma(N)$
consists of matrices congruent to $\mtwosmall{1}{0}{0}{1}$ modulo $N$.

\begin{theorem}\label{thm:paramcurves}
Let $N$ be a positive integer.%
\begin{enumerate}%
\item The non-cuspidal points on $X_0(N)$ correspond to isomorphism
  classes of pairs $(E,C)$ where $C$ is a cyclic subgroup of $E$ of
  order~$N$.  (Two pairs $(E,C)$, $(E',C')$ are isomorphic if there is
  an isomorphism $\vphi:E\to E'$ such that $\vphi(C)=C'$.)%
\item The non-cuspidal points on $X_1(N)$ correspond to isomorphism
  classes of pairs $(E,P)$ where $P$ is a point on $E$ of exact
  order~$N$. (Two pairs $(E,P)$ and $(E',P')$ are isomorphic if there
  is an isomorphism $\vphi:E\to E'$ such that $\vphi(P) = P'$.)%
\item The non-cuspidal points on $X(N)$ correspond to isomorphism
  classes of triples $(E,P,Q)$ where $P,Q$ is a basis for $E[N]$ such
  that $e(P,Q)=-1\in\Z/N\Z$.  (Triples $(E,P,Q)$ and $(E,P',Q')$ are
  isomorphic if there is an isomorphism $\vphi:E \to E'$ such that
  $\vphi(P) = P'$ and $\vphi(Q) = Q'$.)
\end{enumerate}
\end{theorem}
This theorem follows from Propositions~\ref{prop:equiv_to_tau} and
\ref{prop:modtau} below, whose proofs make extensive use of the
following lemma.

\begin{lemma}\label{lem:red}
The reduction 
map $\SL_2(\Z)\to\SL_2(\Z/N\Z)$ 
is surjective.
\end{lemma}
\begin{proof}
  By considering the bottom two entries of an element of
  $\SL_2(\Z/N\Z)$ and using the extended Euclidean algorithm, it
  suffices to prove that if $c,d\in\Z$ and $\gcd(c,d,N)=1$, then there
  exists $\alpha\in\Z$ such that $\gcd(c,d+\alpha N)=1$.  
This suffices because of $g_1 = \smallmtwo{a}{b}{c}{d}$ and $g_2 = \smallmtwo{a'}{b'}{c}{d}$
are both in $\SL_2(\Z/N\Z)$, then a simple calculation shows that
$g_1 g_2^{-1} = \smallmtwo{1}{*}{0}{1}$, and every element of $\SL_2(\Z/N\Z)$
of the form $\smallmtwo{1}{*}{0}{1}$ is in the image of the reduction map.

Let $c_0 =
  \prod_{\ell\mid \gcd(c,d)}\ell^{\ord_{\ell}(c)}$ and $c_1 = c/c_0$.
  We have constructed $c_0$ and $c_1$ so that $\gcd(d,c_1)=1$ and
  $\gcd(c_0, c_1)=1$; also, $\gcd(c_0,N)=1$ since if $\ell\mid
  \gcd(c_0,N)$, then $\ell\mid \gcd(c,d,N)=1$.  Because $\gcd(N c_1,
  c_0)=1$, the class of $N c_1$ generates the additive group
  $\Z/c_0\Z$, so there exists $m$ such that $m\cdot Nc_1 \equiv
  1-d\pmod{c_0}$.  Thus $d+mc_1N \equiv 1 \pmod{c_0}$ and $d+mc_1N
  \equiv d\pmod{c_1}$, so $d+mc_1N$ is a unit modulo both $c_0$ and
  $c_1$, hence $\gcd(d +mc_1N, c)=1$, which proves the lemma.
\end{proof}

\begin{remark}
The analogue of Lemma~\ref{lem:red} is also true
for $\SL_m(\Z)\to\SL_m(\Z/N\Z)$ for any integer $m$.  
See \cite[?]{shimura:intro}.  
\end{remark}

\begin{proposition}\label{prop:equiv_to_tau}
Let $E$ be an elliptic curve over~$\C$.  If $C$ is a cyclic
subgroup of $E$ of order~$N$, then there exists $\tau\in\h$ such
that $(E,C)$ is isomorphic to $(E_\tau, C_\tau)$.  If $P$ is a
point on $E$ of order~$N$, then there exists $\tau\in\C$ such that
$(E,P)$ is isomorphic to $(E_\tau, P_\tau)$.   If $P,Q$ is a basis
for $E[N]$ and $e(P,Q)=-1\in\Z/N\Z$, then there exists $\tau\in\C$
such that $(E,P,Q)$ is isomorphic to $(E_\tau,P_\tau,Q_\tau)$.
\end{proposition}
\begin{proof}
Write $E=\C/\Lambda$ with $\Lambda=\Z\omega_1+\Z\omega_2$ and
$\omega_1/\omega_2\in\h$.

Suppose $P=a\omega_1/N + b\omega_2/N$ is a point of order~$N$.  Then
$\gcd(a,b,N)=1$, since otherwise~$P$ would have order strictly less
than~$N$, a contradiction.  As in Lemma~\ref{lem:red}, we can modify
$a$ and $b$ by adding multiples of~$N$ to them, so that $P=a\omega_1/N
+ b\omega_2/N$ and $\gcd(a,b)=1$. There exists $c,d\in\Z$ such that
$ad-bc=1$, so $\omega_1'=a\omega_1 + b\omega_2$ and
$\omega_2'=c\omega_1+d\omega_2$ form a basis for $\Lambda$, and $C$ is
generated by $P=\omega_1'/N$.  If necessary, replace $\omega_2'$ by
$-\omega_2'$ so that $\tau=\omega_2'/\omega_1'\in\h$. Then $(E,P)$ is
isomorphic to $(E_{\tau},P_{\tau})$.  Also, if $C$ is the subgroup
generated by $P$, then $(E,C)$ is isomorphic to $(E_\tau,C_\tau)$.

Suppose $P=a\omega_1/N+b\omega_2/N$ and
$Q=c\omega_1/N+d\omega_2/N$ are a basis for $E[N]$ with
$e(P,Q)=-1$. Then the matrix $\smallmtwo{\hfill{}a}{\hfill{}b}{-c}{-d}$ has
determinant~$1$ modulo~$N$, so because the map $\SL_2(\Z)\to
\SL_2(\Z/N\Z)$ is surjective, we can replace $a$, $b$, $c$, $d$ by
integers that are equivalent to them modulo~$N$ (so $P$ and $Q$
are unchanged) so that $ad-bc=-1$. Thus
$\omega_1'=a\omega_1+b\omega_2$ and
$\omega_2'=c\omega_1+d\omega_2$ form a basis for $\Lambda$. Let
\[
\tau=\omega_2'/\omega_1'=\frac{c\frac{\omega_1}{\omega_2} +
d}{a\frac{\omega_1}{\omega_2}+b}.
\]
Then $\tau\in\h$ since $\omega_1/\omega_2\in\h$ and
$\smallmtwo{c}{d}{a}{b}$ has determinant $+1$.  Finally, division
by $\omega_1'$ defines an isomorphism $E\to E_\tau$ that sends $P$
to $1/N$ and $Q$ to $\tau/N$.
\end{proof}

%\begin{remark}
%Part 3 of Theorem 2.4 in Chapter~11 of Husem\"oller's book on
%elliptic curves is {\bf wrong}, since he neglects the Weil pairing
%condition.  Also the first paragraph of his proof of the theorem
%is incomplete. 
%\end{remark}

The following proposition completes the proof of
Theorem~\ref{thm:paramcurves}.
\begin{proposition}\label{prop:modtau}
Suppose $\tau,\tau'\in\h$.  Then $(E_\tau,C_\tau)$ is isomorphic
$(E_{\tau'}, C_{\tau'})$ if and only if there exists
$g\in\Gamma_0(N)$ such that $g(\tau)=\tau'$.  Also,
$(E_\tau,P_\tau)$ is isomorphic $(E_{\tau'}, P_{\tau'})$ if and
only if there exists $g\in\Gamma_1(N)$ such that $g(\tau)=\tau'$.
Finally, $(E_\tau,P_\tau,Q_\tau)$ is isomorphic $(E_{\tau'},
P_{\tau'},Q_{\tau'})$ if and only if there exists $g\in\Gamma(N)$
such that $g(\tau)=\tau'$.
\end{proposition}
\begin{proof}
We prove only the first assertion, since the others are proved in
a similar way.  Suppose $(E_\tau,C_\tau)$ is isomorphic to
$(E'_\tau, C'_\tau)$.   Then there is $\lambda\in\C$ such that
$\lambda\Lambda_{\tau} = \Lambda_{\tau'}$, and multiplication by 
$\lambda$ sends $C_{\tau}$ onto $C'_{\tau}$.  Thus $\lambda\tau =
a\tau'+b$ and $\lambda 1 = c\tau' + d$ with $g=\abcd\in\SL_2(\Z)$
(as we saw in the proof of Proposition~\ref{prop:sltwoorbits}).
Dividing the second equation by $N$ we get $\lambda\frac{1}{N} =
\frac{c}{N}\tau' + \frac{d}{N}$, which lies in $\Lambda_{\tau'} =
\Z\tau' + \frac{1}{N}\Z$, by hypothesis.  Thus $c\con 0\pmod{N}$,
so $g\in\Gamma_0(N)$, as claimed.  For the converse, note that if
$N\mid c$, then $\frac{c}{N}\tau' +
\frac{d}{N}\in\Lambda_{\tau'}$.
\end{proof}




\section{The Genus of $X(N)$}\label{sec:genusxN}
Let $N$ be a positive integer.  The aim of this section is to
establish some facts about modular curves associated to congruence
subgroups and compute the genus of $X(N)$. Similar methods can be used
to compute the genus of $X_0(N)$ and $X_1(N)$ (see
Chapter~\ref{chap:genus}).

The groups $\Gamma_0(1)$, $\Gamma_1(1)$, and $\Gamma(1)$ are all
equal to $\SL_2(\Z)$, so $X_0(1)=X_1(1)=X(1)=\P^1$. Since $\P^1$
has genus $0$, we know the genus for each of these three cases.
For general $N$ we obtain the genus by determining the
ramification of the corresponding cover of $\P^1$ and applying the
Hurwitz formula, which we assume the reader is familiar with, but
which we now recall.

Suppose $f : X\to Y$ is a surjective morphism of Riemann surfaces
of degree~$d$.  For each point $x\in X$, let $e_x$ be the
ramification exponent at $x$, so $e_x=1$ precisely when $f$ is
unramified at $x$, which is the case for all but finitely
many~$x$.  (There is a point over $y\in Y$ that is ramified if and
only if the cardinality of $f^{-1}(y)$ is less than the degree
of~$f$.) Let $g(X)$ and $g(Y)$ denote the genera of $X$ and $Y$,
respectively.
\begin{theorem}[Hurwitz Formula]
Let $f:X\to Y$ be as above.  Then
\[
   2g(X)-2 = d(2g(Y)-2) + \sum_{x\in X} (e_x - 1).
\]
If $X\to Y$ is Galois, so the $e_x$ in the fiber over each fixed $y\in
Y$ are all equal to a fixed value $e_y$, then this formula becomes
\[
   2g(X) - 2 = d\left(2g(Y) - 2 + \sum_{y\in Y}
   \left(1-\frac{1}{e_y}\right)\right).
\]
\end{theorem}

Let $X$ be one of the modular curves $X_0(N)$, $X_1(N)$, or $X(N)$
corresponding to a congruence subgroup $\Gamma$, and let
$Y=X(1)=\P^1$. There is a natural map $f:X\to Y$ got by sending
the equivalence class of $\tau$ modulo the congruence subgroup
$\Gamma$ to the equivalence class of $\tau$ modulo $\SL_2(\Z)$.
This is ``the'' map $X\to \P^1$ that we mean everywhere below.

Because $\PSL_2(\Z)$ acts faithfully on $\h$, the degree of~$f$ is the
index in $\PSL_2(\Z)$ of the image of $\Gamma$ in $\PSL_2(\Z)$.  Using
Lemma~\ref{lem:red} that the map $\SL_2(\Z)\to \SL_2(\Z/N\Z)$ is
surjective, we compute these indices, and obtain the following:
\begin{proposition}\label{prop:modcurvedegree}
Suppose $N>2$.  The degree of the map $X_0(N)\to \P^1$ is
$N\prod_{p\mid N}(1+1/p)$.  The degree of the map $X_1(N)\to \P^1$
is $\frac{1}{2}N^2\prod_{p\mid N}(1-1/p^2)$. The degree of the map
from $X(N)\to \P^1$ is $\frac{1}{2}N^3\prod_{p\mid N}(1-1/p^2)$.
If $N=2$, then the degrees are $3$, $3$, and $6$, respectively.
\end{proposition}
\begin{proof}
  This follows from the discussion above, and the observation that for
  $N>2$ the groups $\Gamma(N)$ and $\Gamma_1(N)$ do not contain $-1$
  and the group $\Gamma_0(N)$ does.
\end{proof}

\begin{proposition}\label{prop:ramified}
Let $X$ be $X_0(N)$, $X_1(N)$ or $X(N)$.  Then the map $X\to \P^1$
is ramified at most over $\infty$ and the two points corresponding
to elliptic curves with extra automorphisms (i.e., the two
elliptic curves with $j$-invariants $0$ and $1728$).
\end{proposition}
\begin{proof}
Since we have a tower $X(N)\to X_1(N)\to X_0(N)\to \P^1$, it
suffices to prove the assertion for $X=X(N)$.  Since we do not
claim that there is no ramification over $\infty$, we may restrict
to $Y(N)$.  By Theorem~\ref{thm:paramcurves}, the points on $Y(N)$
correspond to isomorphism classes of triples $(E,P,Q)$, where $E$
is an elliptic curve over~$\C$ and $P,Q$ are a basis for $E[N]$.
The map from $Y(N)$ to $\P^1$ sends the isomorphism class of
$(E,P,Q)$ to the isomorphism class of $E$.  The equivalence class
of $(E,P,Q)$ also contains $(E,-P,-Q)$, since $-1:E\to E$ is an
isomorphism.   The only way the fiber over $E$ can have
cardinality smaller than the degree is if there is an extra
equivalence $(E,P,Q) \to (E,\vphi(P),\vphi(Q))$ with $\vphi$ an
automorphism of $E$ not equal to $\pm 1$.   The theory of CM
elliptic curves shows that there are only two isomorphism classes
of elliptic curves~$E$ with automorphisms other than $\pm1$, and
these are the ones with $j$-invariant $0$ and $1728$.  This proves
the proposition.
\end{proof}


\begin{theorem}
%For $N>4$, the genus of $X_0(N)$ is
%\[
% g(X_0(N)) = 1 + N\prod_{p\mid N}(1+1/p) - \frac{1}{2} \sigma(N) -
% \frac{1}{4}\mu_{1728}(N) - \frac{1}{3}\mu_0(N).
%\]
%Here $\sigma(N) = \sum_{d\mid n} \varphi(d) \varphi(N/d)$,
%$\mu_{1728}(N) = 0$ if $4\mid N$ and $\mu_{1728}(N) = \prod_{p\mid
%N}(1+(-4/p))$ otherwise (where $(-4/p)$ is the quadratic
%reciprocity symbol).  Also, $\mu_0(N) = 0$ if $2\mid N$ or $9\mid
%N$, and $\mu_0(N) = \prod_{p\mid N} (1+(-3/p))$ otherwise.
%
%For $N>4$, the genus of $X_1(N)$ is $$1 +
%\frac{1}{2}N^2\prod_{p\mid N}(1-1/p^2) - \frac{1}{2}
%\sigma^*(N),$$ where $\sigma^*(N)=\frac{1}{2}\sum_{d\mid
%n}\vphi(d) \vphi(N/d)$.  For example, when $N\geq 5$ is prime,
%the genus of $X_1(N)$ is $(N-5)(N-7)/24$.
%
For $N>2$, the genus of $X(N)$ is
\[
  g(X(N)) = 1 + \frac{N^2(N-6)}{24}\prod_{p\mid N}\left(1-\frac{1}{p^2}\right),
\]
where $p$ runs through the prime divisors of $N$.
For $N=1,2$, the genus is $0$.
\end{theorem}

Thus if $g_N=g(X(N))$, then $g_1=g_2=g_3=g_4=g_5=0$, $g_6=1$,
$g_7=3$, $g_8=5$, $g_9=10$, $g_{389}=2414816$, and $g_{2003} =
333832500$.
%function g(N)
%   return 1 +
%          N^2*(N-6)/24 *
%          &*[1-1/F[1]^2 : F in Factorization(N)];
%end function;

\begin{proof}
  Since $\Gamma(N)$ is a normal subgroup of $\SL_2(\Z)$, it follows
  that $X(N)$ is a Galois covering of $X(1)=\P^1$, so the ramification
  indices $e_x$ are all the same for $x$ over a fixed point $y\in
  \P^1$; we denote this common index by $e_y$. The fiber over the
  curve with $j$-invariant $0$ has size one-third of the degree, since
  the automorphism group of the elliptic curve with $j$-invariant $0$
  has order $6$, so the group of automorphisms modulo~$\pm 1$ has
  order three, hence $e_0=3$. Similarly, the fiber over the curve with
  $j$-invariant $1728$ has size half the degree, since the
  automorphism group of the elliptic curve with $j$-invariant $1728$
  is cyclic of order~$4$, so $e_{1728}=2$.

To compute the ramification degree $e_\infty$ we use the orbit
stabilizer theorem.  The fiber of $X(N)\to X(1)$ over $\infty$ is
exactly the set of $\Gamma(N)$ equivalence classes of cusps, which
is $\Gamma(N)\infty, \Gamma(N)g_2\infty, \ldots,
\Gamma(N)g_r\infty$, where $g_1=1, g_2, \ldots, g_r$ are coset
representatives for $\Gamma(N)$ in $\SL_2(\Z)$. By the
orbit-stabilizer theorem, the number of cusps equals
$\#(\Gamma(1)/\Gamma(N))/\#S$, where $S$ is the stabilizer of
$\Gamma(N)\infty$ in $\Gamma(1)/\Gamma(N)\isom \SL_2(\Z/N\Z)$.
Thus $S$ is the subgroup $\left\{\pm \mtwosmall{1}{n}{0}{1} \,:\,
0\leq n < N-1\right\}$, which has order $2N$.  Since the degree of
$X(N)\to X(1)$ equals $\#(\Gamma(1)/\Gamma(N))/2$, the number of
cusps is the degree divided by $N$.  Thus $e_\infty = N$.

The Hurwitz formula for $X(N)\to X(1)$ with $e_0=3$, $e_{1728}=2$,
and $e_\infty=N$, is $$2g(X(N))-2 = d\left(0-2 +
\left(1-\frac{1}{3} + 1-\frac{1}{2} +
1-\frac{1}{N}\right)\right),$$ where $d$ is the degree of $X(N)\to
X(1)$. Solving for $g(X(N))$ we obtain
\[
2g(X(N)) - 2 = d \left(1 - \frac{5}{6} - \frac{1}{N}\right)
           = d \left( \frac{N-6}{6N}\right),
\]
so
\[
g(X(N)) = 1 + \frac{d}{2}\left(\frac{N-6}{6N}\right) =
\frac{d}{12N}(N-6) + 1.
\]
Substituting the formula for $d$ from
Proposition~\ref{prop:modcurvedegree} yields the claimed formula.

\end{proof}
\chapter{Modular Curves}\label{ch:modcurves}
\index{modular curves}
% define various gammas
\section{Cusp Forms}
Recall that if $N$ is a positive integer we define the congruence
subgroups
$\Gamma(N)\subset\Gamma_1(N)\subset\Gamma_0(N)$ by
\begin{align*}
\Gamma_0(N) & = \{\abcd \in \sltwoz : c\equiv 0 \pmod{N}\}\\
\Gamma_1(N) & = \{\abcd \in \sltwoz : a\equiv d\equiv 1, c\equiv 0 \pmod{N}\}\\
\Gamma(N) & = \{\abcd \in \sltwoz : \abcd \equiv
             \bigl(\begin{smallmatrix}1&0\\0&1\end{smallmatrix}\bigr) \pmod{N}\}.
\end{align*}

Let $\Gamma$ be one of the above subgroups.
One can give a construction of the space $S_k(\Gamma)$ of cusp forms
of weight $k$ for the action of $\Gamma$ using the language of
algebraic geometry.
Let $X_{\Gamma}=\Gamma\backslash\cH^{*}$
be the upper half plane (union the cusps)
modulo the action of $\Gamma$. Then $X_{\Gamma}$ can be given the structure
of compact Riemann surface and
$S_2(\Gamma)=H^0(X_{\Gamma},\Omega^1)$ where
$\Omega^1$ is the sheaf of differential 1-forms on $X_{\Gamma}$.
This is true since an element of $H^0(X_{\Gamma},\Omega^1)$
is a differential form $f(z)dz$, holomorphic on $\cH$ and
the cusps, which is invariant with respect to the action
of $\Gamma$. If $\gamma=\abcd\in\Gamma$ then
$$d(\gamma(z))/dz=(cz+d)^{-2}$$
so
$$f(\gamma(z))d(\gamma(z))=f(z)dz$$
if and only if $f$ satisfies the modular condition
$$f(\gamma(z))=(cz+d)^{2}f(z).$$

%There is a similar construction of $S_k(\Gamma)$ for $k>2$.
%Sort of discussed in Section 12 of Diamond-Im or appendix
%to Katz-$p$-adic properties of modular schemes and modular forms
%but gets relativel technical quickly.   Lang
%also mentions this in his intro on page 34, but says *nothing*
%more (and is even misleading). 

\section{Modular curves}\index{modular curves}
Recall from Section~\ref{sec:modcurveparam} that
$\sltwoz\backslash\sH$ parameterizes isomorphism classes of elliptic
curves, and the other congruence subgroups also give rise to similar
parameterizations.  Thus $\Gamma_0(N)\backslash\sH$ parameterizes
isomorphism classes of pairs $(E,C)$ where $E$ is an elliptic curve
and $C$ is a cyclic subgroup of order $N$, and
$\Gamma_1(N)\backslash\cH$ parameterizes isomorphism classes of pairs
$(E,P)$ where $E$ is an elliptic curve and $P$ is a point of exact
order $N$.  

We can specify a point of exact order $N$ on an elliptic curve $E$ by
giving an injection $\bZ/N\bZ\hookrightarrow E[N]$, or equivalently,
an injection $\Mu_N\hookrightarrow E[N]$ where $\Mu_N$ denotes the
$N$th roots of unity.  Then $\Gamma(N)\backslash\sH$ parameterizes
isomorphism classes of pairs $(E,\{\alpha,\beta\})$, where
$\{\alpha,\beta\}$ is a basis for $E[N]\ncisom(\bZ/N\bZ)^2$.

The above quotients spaces are called {\em moduli spaces} for the
{\em moduli problem} of determining equivalence classes of
pairs ($E + $ extra structure). \index{$\Gamma(N)$-structures}

\section{Classifying $\Gamma(N)$-structures}
\begin{defn}
Let $S$ be an arbitrary scheme. An {\bfseries elliptic curve}
$E/S$ is a proper smooth curve
$$\xymatrix{E\ar[d]_f\\S}$$
with geometrically connected fibers all of genus one, give with a
section ``0''.
\end{defn}

Loosely speaking, proper is a generalization of projective
and smooth generalizes nonsingularity. See
Hartshorne \cite[III.10]{hartshorne}
for the precise definitions.
 
\begin{defn}
Let $S$ be any scheme and $E/S$ an elliptic curve.
A {\bfseries $\Gamma(N)$-structure} on $E/S$ is
a group homomorphism
$$\varphi:(\bZ/N\bZ)^2\into E[N](S)$$
whose image ``generates'' $E[N](S)$.
(A good reference is \cite[Ch.~3]{katzmazur}.)
\end{defn}

Define a functor from the category of $\Q$-schemes to the
category of sets by sending a scheme $S$ to the
set of isomorphism classes of pairs
$$(E, \Gamma(N)\text{-structure})$$\index{$\Gamma(N)$-structures}%
where $E$ is an elliptic curve defined over $S$ and
isomorphisms (preserving the $\Gamma(N)$-structure) are taken
over $S$. An isomorphism preserves the $\Gamma(N)$-structure
if it takes the two distinguished generators to the two
distinguished generators in the image (in the correct order).

\begin{theorem}
For $N\geq 4$ the functor defined above is representable and
the object representing it is the modular curve $X$ corresponding
to $\Gamma(N)$.
\end{theorem}

What this means is that given a $\Q$-scheme $S$, the
set $$X(S)=\Mor_{\Q\text{-schemes}}(S,X)$$
is isomorphic to
the image of the functor's value on $S$.

There is a natural way to map a pair $(E,\Gamma(N)\text{-structure})$
\index{$\Gamma(N)$-structures} to an $N$th root of unity.  Recall from
Section~\ref{sec:modcurveparam} that if $P,Q$ are the distinguished
basis of $E[N]$ we send the pair $(E,\Gamma(N)\text{-structure})$ to
$$e_N(P,Q)\in\Mu_N$$
where $e_N:E[N]\cross E[N]\into \Mu_N$ is the Weil pairing. 

%% 2/2/96
\section{More on integral Hecke operators}

Consider the algebra of integral Hecke operators $\T=\T_{\Z}$
on the space of cusp forms $S_k(\C)$ with respect to the action
of the full modular group $\sltwoz$. Our goal is to see why
$\T\isom\Z^d$ where $d=\dim_{\C}S_k(\C)$.

Suppose $A\subset\C$ is any {\em subring} of $\C$ and let
$$\T_A=A[\ldots,T_n,\ldots]\subset \End_{\C}S_k.$$
We have a natural map
$$\T_A\tensor_A\C\into\T_C$$
but we do not yet know that it is
an isomorphism.

\section{Complex conjugation}\label{sec:conjugation}
We have a conjugate linear map on functions
$$f(\tau)\mapsto \overline{f(-\overline{\tau})}.$$
Since $\overline{(e^{-2\pi i\overline{\tau}})}=e^{2\pi i \tau}$,
it follows that under the above map,
$$\sum_{n=1}^{\infty} a_n q^n \mapsto
                 \sum_{n=1}^{\infty}\overline{a_n}q^n,$$
so it is reasonable to call this map ``complex conjugation''. Furthermore,
if we know that
$$S_k(\C)=\C\tensor_{\Q}S_k(\Q),$$
then it follows that complex conjugation
takes $S_k(\C)$ into $S_k(\C)$. To see this note that if
we have the above equality then every element of
$S_k(\C)$ is a $\C$-linear combination of elements of
$S_k(\Q)$; conversely, it is clear that the set of such
$\C$-linear combinations is invariant under the action
of complex conjugation.

\section{Isomorphism in the real case}

\begin{proposition}
   $\T_{\R}\tensor_{\R}\C \isom \T_{\C}$, as $\C$-vector spaces.
\end{proposition}
\begin{proof}
Since $S_k(\R)=S_k(\C)\intersect\R[[q]]$ and since
Theorem~\ref{thm:Mkinteger} assures us that there is a $\C$-basis of
$S_k(\C)$ consisting of forms with integral coefficients,
we see that $S_k(\R)\ncisom \R^d$ where $d=\dim_{\C}S_k(\C)$.
(Any element of $S_k(\R)$ is a $\C$-linear combination
of the integral basis, hence equating real and imaginary
parts, an $\R$-linear combination of the integral basis,
and the integral basis stays independent over $\R$.)
By considering the explicit formula for the action
of the Hecke operators $T_n$ on $S_k$ (see Section~\ref{sec:heckeonq})
we see that $\T_{\R}$ leaves $S_k(\R)$ invariant, thus
$$\T_{\R}=\R[\ldots,T_d,\ldots]\subset \End_{\R}S_k(\R).$$
In Section~\ref{sec:pairing1} we defined a perfect pairing
$$\T_{\C}\times S_k(\C)\into \C.$$ By restricting
to $\R$ we again obtain a perfect pairing, so we see that
$\T_{\R}\ncisom S_k(\R) \ncisom {\R}^d$ which
implies that
$\T_R\tensor_{\R}\C \xrightarrow{\sim}\T_{\C}.$
\end{proof}

The above argument also shows that $S_k(\C)\isom S_k(\R)\tensor_{\R}
\C$, so complex conjugation is defined over $\R$.
%% For some reason I feel something circular is going on here, but
%% i can't put my finger on it... :(

\section{The Eichler-Shimura isomorphism}
\index{Eichler-Shimura}

Our goal in this section is to briefly outline a homological
interpretation of $S_k = S_k(\C)$. For details see
\cite[VI]{lang:modular}, the original paper \cite{shimura:surles}, or
\cite[VIII]{shimura:intro}.

How is the space $S_k(\C)$ of cusp forms 
related to the cohomology group $H^1(X_{\Gamma},\R)$?
Suppose $k=2$ and $\Gamma\subset\sltwoz$ is a congruence subgroup,
and let $X_{\Gamma}=\overline{\Gamma\backslash\cH}$ be the
Riemann surface obtained by compactifying the upper half plane modulo
the action of $\Gamma$. Then $S_k(\C)=H^0(X_{\Gamma},\Omega^{1})$ so
we have a pairing
$$H_1(X_{\Gamma},\Z)\cross S_k(\C)\into \C$$
given by integration
$$(\gamma,\omega)\mapsto \int_{\gamma}\omega.$$
This gives an embedding
$$\Z^{2d}\ncisom{}H_1(X_{\Gamma},\Z)\hookrightarrow
                      \Hom_{\C}(S_k(\C),\C)\isom {\C}^d$$
of a ``lattice'' in $\C^d$ (we write ``lattice'' because we have not
shown that the image of $\Z^{2d}$ is really a lattice, i.e., has $\R$
span equal to $\C^d$). 
Passing to the quotient and compactifying, we obtain a complex torus
called the Jacobian\index{Jacobian} of $X_{\Gamma}.$
Again, using the above pairing, we obtain an embedding
$${\C}^d\ncisom S_k(\C)\hookrightarrow
               \Hom(H_1(X_{\Gamma},\Z),\C)\isom\C^{2d}$$
which, upon taking the real part, gives
$$
S_k(\C) \into \Hom(H_1(X_{\Gamma},\Z),\R)
         \isom H^1(X_{\Gamma},\R) \isom H^1_p(\Gamma,\R)
$$
where $H^1_p(\Gamma,\R)$ denotes the {\em parabolic} group cohomology
of $\Gamma$ with respect to the trivial action. It is this result, that we
may view $S_k(\C)$ as the cohomology group $H^1_p(\Gamma,\R)$, which was
alluded to above.

Shimura\index{Shimura} generalized this for arbitrary $k\geq 2$, and showed 
that $$S_k(\C)\isom{}H_p^1(\Gamma,V_k),$$
where $V_k$ is a $k-1$ dimensional $\R$-vector space.
The isomorphism is (approximately) the following:
$f\in S_k(\C)$ is sent to the cocycle map
$$\gamma\mapsto \real\int_{\tau_0}^{\gamma\tau_0}f(\tau){\tau}^{i}d\tau,\quad
i=0,\ldots,k-2.$$
Let $W=\R\oplus\R$, then $\Gamma$ acts on $W$ by
$$\begin{pmatrix}a&b\\c&d\end{pmatrix}:
  \begin{pmatrix}x\\y\end{pmatrix}\mapsto
  \begin{pmatrix}ax+by\\cx+dy\end{pmatrix}
$$
so $\Gamma$ acts on
$$V_k=\Sym^{k-2}W=W^{\otimes k-2}/S_{k-2}$$
where $S_{k-2}$ is the symmetric group on $k-2$ symbols
(note that $\dim V_k = k-1$).
Let 
$$
L=H_p^1(\Gamma,\Sym^{k-2}(\Z\oplus\Z)).
$$
Under the isomorphism 
$$
 S_k(\C)\isom H^1_p(\Gamma,\R),
$$
$L$ is a sublattice of $S_k(\C)$ of $\Z$-rank $2d=2\dim_{\C}S_k(\C)$ which
is $T_n$-stable for all $n$. Thus we have an embedding
$$\T_{\Z} = \T \hookrightarrow \End L,$$
so
$\T_{\R}\subset\End_{\R}(L\tensor\R)$
and $\T_{\Z}\tensor_{\Z}\R\isom \T_{\R}$, which has rank $d$.

%% What is the point of this last bit??
% \section{The Petersson inner product is Hecke compatible}\index{inner product}

% \begin{theorem}
% Let $\Gamma=\sltwoz$, let $f,g\in S_k(\C)$,  and let
% $$\langle f,g\rangle=\int_{\Gamma\backslash\cH}  f(\tau)\overline{g(\tau)}y^{k}
%                \frac{dx dy}{y^2}.$$
% Then this integral is well-defined and Hecke compatible, that is,
% $\langle f|T_n,g\rangle=\langle f,g|T_n\rangle$ for all $n$.
% \end{theorem}
% \begin{proof}
% See \cite[III]{lang:modular}.
% \end{proof}


\chapter{Modular Symbols}
This chapter is about how to explicitly compute the homology of
modular curves  using modular symbols.

We assume the reader is familiar with basic notions of algebraic
topology, including homology groups of surfaces and triangulation.  We
also assume that the reader has read Chapter~\ref{sec:anmodcurve}
about the fundamental domain for the action of $\PSL_2(\Z)$ on the
upper half plane and the analytic construction of modular curves.

Some standard references for modular symbols are
\cite{manin:parabolic} \cite[IV]{lang:modular},
\cite{cremona:algs}, and \cite{merel:1585}.
Sections~\ref{sec:modsymintro}--\ref{sec:maninsymintro} below very
closely follow Section~1 of Manin's paper \cite{manin:parabolic}.

For the rest of this chapter, let $\Gamma=\PSL_2(\Z)$ and let $G$
be a subgroup of $\Gamma$ of finite index. Note that we do not
require $G$ to be a congruence subgroup.  The quotient
$X(G)=G\backslash\h^*$ of $\h^*=\h\union\P^1(\Q)$ by $G$ has an
induced structure of a compact Riemann surface.  Let $\pi:\h^*\to
X(G)$ denote the natural projection.  The matrices
$$s=\mtwo{0}{-1}{1}{\hfill0}\quad\text{and}\quad t=\mtwo{1}{-1}{1}{0}$$
together generate $\Gamma$; they have orders $2$ and $3$,
respectively.

\section{Modular symbols}\label{sec:modsymintro}
Let $\H^0(X(G),\Omega^1)$ denote the complex vector space of
holomorphic $1$-forms on $X(G)$.  Integration of differentials
along homology classes defines a perfect  pairing
\[
  \H_1(X(G),\R) \times \H^0(X(G),\Omega^1) \to \C,
\]
hence an isomorphism
$$\H_1(X(G),\R) \isom \Hom_{\C}(\H^0(X(G),\Omega^1),\C).$$
For more details, see \cite[\S{}IV.1]{lang:modular}.

Given two elements $\alpha,\beta\in\h^*$, integration from
$\alpha$ to $\beta$ induces a well-defined element of
$\Hom_{\C}(\H^0(X(G),\Omega^1),\C)$, hence an element
$$\{\alpha,\beta\}\in \H_1(X(G),\R).$$
\begin{definition}[Modular symbol]
The homology class $\{\alpha,\beta\}\in \H_1(X(G),\R)$ associated
to $\alpha,\beta\in\h^*$ is called the {\em modular symbol}
attached to $\alpha$ and $\beta$.
\end{definition}


\begin{proposition}\label{prop:modsymprop}
The symbols $\{\alpha,\beta\}$ have the following properties:
\begin{enumerate}
\item $\{\alpha,\alpha\}=0$, $\{\alpha,\beta\}=-\{\beta,\alpha\}$,
and $\{\alpha,\beta\} + \{\beta,\gamma\} + \{\gamma,\alpha\}=0$.
\item $\{g \alpha, g\beta\} = \{\alpha,\beta\}$ for all $g\in G$
\item If $X(G)$ has nonzero genus, then $\{\alpha,\beta\}\in
\H_1(X(G),\Z)$ if and only if $G\alpha=G\beta$ (i.e., we
have $\pi(\alpha)=\pi(\beta)$).
\end{enumerate}
\end{proposition}

\begin{remark}
We only have $\{\alpha,\beta\} = \{\beta,\alpha\}$ if
$\{\alpha,\beta\}=0$, so the modular symbols notation, which
suggests ``unordered pairs,'' is actively misleading.
\end{remark}


\begin{proposition}\label{prop:group_to_homology}
For any $\alpha\in\h^*$, the map $G\to\H_1(X(G),\Z)$ that sends
$g$ to $\{\alpha,g\alpha\}$ is a surjective group homomorphism
that does not depend on the choice of~$\alpha$.
\end{proposition}
\begin{proof}
If $g, h\in G$ and $\alpha\in\h^*$, then
\[
  \{\alpha, gh(\alpha)\} = \{\alpha, g\alpha\} + \{g\alpha,
  gh\alpha \}  = \{\alpha, g\alpha \} + \{\alpha, h \alpha\},
\]
so the map is a group homomorphism.   To see that the map does not
depend on the choice of~$\alpha$, suppose $\beta\in\h^*$.  By
Proposition~\ref{prop:modsymprop}, we have $\{\alpha,\beta\} =
\{g\alpha,g\beta\}$.  Thus
$$\{\alpha,g\alpha\} + \{g\alpha,\beta\} = \{g\alpha,\beta\} +
\{\beta,g\beta\},$$ so cancelling $\{g\alpha,\beta\}$ from both
sides proves the claim.

The fact that the map is surjective follows from general facts
from algebraic topology.    Let $\h^0$ be the complement of
$\Gamma i \union \Gamma\rho$ in $\h$, fix $\alpha\in\h^0$, and let
$X(G)^0=\pi(\h^0)$.  The map $\h^0\to X(G)^0$ is an unramified
covering of (noncompact) Riemann surfaces with automorphism
group~$G$.  Thus $\alpha$ determines a group homomorphism
$\pi_1(X(G)^0,\pi(\alpha))\to G$.  When composed with the morphism
$G\to \H_1(X(G),\Z)$ above, the composition
$$\pi_1(X(G)^0,\pi(\alpha))\to G\to\H_1(X(G),\Z)$$
is the canonical map from the fundamental group of $X(G)^0$ to the
homology of the corresponding compact surface, which is
surjective.  This forces the map $G\to \H_1(X(G),\Z)$ to be
surjective, which proves the claim.
\end{proof}


\section{Manin symbols}\label{sec:maninsymintro}
We continue to assume that $G$ is a finite-index subgroup of
$\Gamma=\PSL_2(\Z)$, so the set $G\backslash\Gamma = \{G g_1,
\dots G g_d\}$ of right cosets of $G$ in $\Gamma$ is finite.
Manin symbols are a certain finite subset of modular symbols that
are indexed by right cosets of $G$ in $\Gamma$.

\subsection{Using continued fractions to obtain surjectivity}
Let $R=G\backslash\Gamma$ be the set of right cosets of $G$ in
$\Gamma$.  Define
\[
   [\,] : R\to \H_1(X(G),\R)
\]
by $[r] = \{r0,r\infty\}$, where $r0$ means the image of $0$ under
any element of the coset $r$ (it doesn't matter which).  For
$g\in\Gamma$, we also write $[g]=[gG]$.

\begin{proposition}\label{prop:manin_symbols_generate}
Any element of $\H_1(X(G),\Z)$ is a sum of elements of the form
$[r]$, and the representation $\sum n_r \{\alpha_r,\beta_r\}$ of
$h\in \H_1(X(G),\Z)$ can be chosen so that $\sum
n_r(\pi(\beta_r)-\pi(\alpha_r)) = 0\in\Div(X(G))$.
\end{proposition}
\begin{proof}
By Proposition~\ref{prop:group_to_homology}, every element~$h$ of
$\H_1(X(G),\Z)$ is of the form $\{0,g(0)\}$ for some $g\in\G$.  If
$g(0)=\infty$, then $h=[G]$ and $\pi(\infty)=\pi(0)$, so we may
assume $g(0)=a/b\neq \infty$, with $a/b$ in lowest terms and
$b>0$. Also assume $a>0$, since the case $a<0$ is treated in the
same way. Let
$$0=\frac{p_{-2}}{q_{-2}} = \frac{0}{1},\,\,
\frac{p_{-1}}{q_{-1}}=\frac{1}{0},\,\,
\frac{p_0}{1}=\frac{p_0}{q_0},\,\, \frac{p_1}{q_1},\,\,
\frac{p_2}{q_2},\,\ldots,\,\frac{p_n}{q_n}=\frac{a}{b}$$ denote
the continued fraction convergents of the rational number $a/b$.
Then
$$p_j q_{j-1}
  - p_{j-1} q_j = (-1)^{j-1}\qquad \text{for }-1\leq j\leq n.$$
If we let $g_j =
\mtwo{(-1)^{j-1}p_j}{p_{j-1}}{(-1)^{j-1}q_j}{q_{j-1}}$, then
$g_j\in\sltwoz$ and
\begin{align*}
  \left\{0,\frac{a}{b}\right\}
 &=\sum_{j=-1}^{n}\left\{\frac{p_{j-1}}{q_{j-1}},\frac{p_j}{q_j}\right\}\\
 &=\sum_{j=-1}^{n} \{g_j0,g_j\infty\})\\
 &=\sum_{j=-1}^{r} [g_j].
\end{align*}

For the assertion about the divisor sum equaling zero, notice that
the endpoints of the successive modular symbols cancel out,
leaving the difference of $0$ and $g(0)$ in the divisor group,
which is $0$.
\end{proof}

\begin{lemma}
If $x=\sum_{j=1}^t n_j\{\alpha_j,\beta_j\}$ is a $\Z$-linear
combination of modular symbols for~$G$ and $\sum
n_j(\pi(\beta_j)-\pi(\alpha_j))=0\in\Div(X(G))$, then
$x\in\H_1(X(G),\Z)$.
\end{lemma}
\begin{proof}
We may assume that each $n_j$ is $\pm 1$ by allowing duplication.
We may further assume that each $n_j=1$ by using that
$\{\alpha,\beta\}=-\{\beta,\alpha\}$.  Next reorder the sum so
$\pi(\beta_j)=\pi(\alpha_{j+1})$ by using that the divisor is $0$,
so every $\beta_j$ must be equivalent to some $\alpha_{j'}$, etc.
The lemma should now be clear.\end{proof}

\subsection{Triangulating $X(G)$ to obtain injectivity}

Let $C$ be the abelian group generated by symbols $(r)$ for $r\in
G\backslash \Gamma$, subject to the relations
\[
 (r) + (rs) = 0, \qquad\text{ and } (r)=0 \quad{ if }\quad r=rs.
\]
For $(r)\in C$, define the boundary of $(r)$ to be the difference
$\pi(r\infty)-\pi(r0)\in\Div(X(G))$.  Since $s$ swaps $0$ and
$\infty$, the boundary map is a well-defined map on $C$. Let $Z$
be its kernel.

Let $B$ be the subgroup of $C$ generated by symbols $(r)$, for all
$r\in G\backslash\Gamma$ that satisfy $r=rt$, and by
$(r)+(rt)+(rt^2)$ for all other $r$.  If $r=rt$, then $rt(0) =
r(0)$, so $r(\infty) = r(0)$, so $(r)\in Z$.   Also, using
(\ref{eqn:staction}) below, we see that for any~$r$, the element
$(r)+(rt)+(rt^2)$ lies in $Z$.

The map $G\backslash \Gamma\to \H_1(X(G),\R)$ that sends $(r)$ to
$[r]$ induces a homomorphism $C\to \H_1(X(G),\R)$, so by
Proposition~\ref{prop:manin_symbols_generate} we obtain a
surjective homomorphism
\[
  \psi: Z/B \to \H_1(X(G),\Z).
\]

\begin{theorem}[Manin]\label{thm:maninsymbols}
The map $\psi: Z/B\to \H_1(X(G),\Z)$ is an isomorphism.
\end{theorem}
\begin{proof}
We only have to prove that $\psi$ is injective.  Our proof follows
the proof of \cite[Thm.~1.9]{manin:parabolic} very closely.   We
compute the homology $\H_1(X(G),\Z)$ by triangulating $X(G)$ to
obtain a simplicial complex $L$ with homology $Z_1/B_1$, then
embed $Z/B$ in the homology $Z_1/B_1$ of $X(G)$.  Most of our work
is spent describing the triangulation~$L$.

\begin{figure}
\begin{center}
\includegraphics[height=0.4\textheight]{graphics/manin_symbol_proof}\vspace{-1in}
\caption{\label{fig:etriangle}}
\end{center}
\end{figure}
Let $E$ denote the {\em interior} of the triangle with vertices
$0$, $1$, and $\infty$, as illustrated in
Figure~\ref{fig:etriangle}. Let $E'$ denote the union of the
interior of the region bounded by the path from $i$ to
$\rho=e^{\pi i/3}$ to $1+i$ to $\infty$ with the indicated path
from $i$ to $\rho$, not including the vertex~$i$.

When reading the proof below,  it will be helpful to look at the
following table, which illustrates what
$s=\smallmtwo{0}{-1}{1}{\hfill0}$,
$t=\smallmtwo{1}{-1}{1}{\hfill0}$, and $t^2$ do to the vertices in
Figure~\ref{fig:etriangle}:
\begin{equation}\label{eqn:staction}
\begin{array}{|c|ccccccc|}\hline
  1 & 0 & 1 & \infty & i & 1+i & (1+i)/2 & \rho \\\hline
  s & \infty & -1 & 0 & i & (-1+i)/2 &  -1+i & -\overline{\rho}
  \\\hline
  t & \infty & 0 & 1 & 1+i & (1+i)/2 & i & \rho \\\hline
  t^2 & 1 & \infty & 0 & (1+i)/2 & i & 1+i & \rho \\\hline
\end{array}
\end{equation}


Note that each of $E'$, $tE'$, and $t^2E'$ is a fundamental domain
for $\Gamma$, in the sense that every element of the upper half
plane is conjugate to exactly one element in the closure of $E'$
(except for identifications along the boundaries). For example,
$E'$ is obtained from the standard fundamental domain for
$\Gamma$, which has vertices $\rho^2$, $\rho$, and $\infty$, by
chopping it in half along the imaginary axis, and translating the
piece on the left side horizontally by~$1$.

If $(0,\infty)$ is the path from $0$ to $\infty$, then
$t(0,\infty)=(\infty,1)$ and $t^2(0,\infty)=(1,0)$.  Also,
$s(0,\infty)=(\infty,0)$.  Thus each half side of~$E$ is
$\Gamma$-conjugate to the side from $i$ to $\infty$.  Also, each
$1$-simplex in Figure~\ref{fig:etriangle}, i.e., the sides that
connected two adjacent labeled vertices such as $i$ and $\rho$,
maps homeomorphically into $X(\Gamma)$.  This is clear for the
half sides, since they are conjugate to a path in the interior of
the standard fundamental domain for $\Gamma$, and for the medians
(lines from midpoints to $\rho$) since the path from $i$ to $\rho$
is on an edge of the standard fundamental domain with no self
identifications.

We now describe our triangulation $L$ of $X(G)$:
\begin{itemize}
\item[\bf $0$-cells] The $0$ cells are the cusps $\pi(\P^1(\Q))$
and $i$-elliptic points $\pi(\Gamma{}i)$.  Note that these are the
images under $\pi$ of the vertices and midpoints of sides of the
triangles $gE$, for all $g\in\Gamma$.
%

\item[\bf $1$-cells] The $1$ cells are the images of the
half-sides of the triangles $gE$, for $g\in\Gamma$, oriented from
the edge to the midpoint (i.e., from the cusp to the $i$-elliptic
point).  For example, if $r=Gg$ is a right coset, then
\[
  e_1(r) = \pi(g(\infty),g(i))\in X(G)
\]
is a $1$ cell in $L$.  Since, as we observed above, every half
side is $\Gamma$-conjugate to $e_1(G)$, it follows that every
$1$-cell is of the form $e(r)$ for some right coset
$r\in{}G\backslash \Gamma$.

Next observe that if $r\neq r'$ then
\begin{equation}\label{eqn:differentcycles}
e_1(r)=e_1(r') \qquad \text{implies}\qquad r'=rs.
\end{equation}
Indeed, if $\pi(g(\infty),g(i)) = \pi(g'(\infty),g'(i))$, then
$ri=r'i$ (note that the endpoints of a path are part of the
definition of the path).  Thus there exists $h, h'\in G$ such that
$hg(i) = h'g'(i)$.  Since the only nontrivial element of $\Gamma$
that stabilizes $i$ is $s$, this implies that $(hg)^{-1} h'g' =
s$. Thus $h'g'=hgs$, so $Gg'=Ggs$, so $r'=rs$.
%

\item[\bf $2$-cells] There are two types of $2$-cells, those with
$2$ sides and those with $3$.

{\bf $2$-sided:} The $2$-sided $2$-cells $e_2(r)$ are indexed by
the cosets $r=Gg$ such that $rt=r$.  Note that for such an~$r$, we
have $\pi(rE')=\pi(rtE')=\pi(rt^2E')$. The $2$-cell $e_2(r)$ is
$\pi( g E')$.  The image  $g(\rho,i)$ of the half median maps to a
line from the center of $e_2(r)$ to the edge
$\pi(g(i))=\pi(g(1+i))$.  Orient $e_2(r)$ in a way compatible with
the $e_1$.  Since $Ggt=Gg$,
\[
  \pi(g(1+i),g(\infty)) = \pi(gt^2(1+i),gt^2(\infty)) =
  \pi(g(i),g(0)) = \pi(gs(i),gs(\infty)),
\]
so
\[ e_1(r) - e_1(rs)
   = \pi(g(\infty),g(i)) + \pi(gs(i),gs(\infty))
   = \pi(g(\infty),g(i)) + \pi(g(1+i),g(\infty)).
\]
Thus $$\partial e_2(r) = e_1(r) - e_1(rs).$$

Finally, note that if $r'\neq r$ also satisfies $r't=r'$, then
$e_2(r) \neq e_2(r')$ (to see this use that $E'$ is a fundamental
domain for $\Gamma$).

%
{\bf $3$-sided:} The $3$-sided $2$-cells $e_2(r)$ are indexed by
the cosets $r=Gg$ such that $rt\neq r$.    Note that for such
an~$r$, the three triangles $rE'$, $rtE'$, and $rt^2E'$ are
distinct (since they are nontrivial translates of a fundamental
domain).  Orient $e_2(r)$ in a way compatible with the $e_1$ (so
edges go from cusps to midpoints).  Then
\[
\partial e_2(r) = \sum_{n=0}^2 \left( e_1(rt^n) - e_1(rt^ns)
\right).
\]

%
\end{itemize}

We have now defined a complex~$L$ that is a triangulation of
$X(G)$. Let $C_1$, $Z_1$, and $B_1$ be the group of $1$-chains,
$1$-cycles, and $1$-boundaries of the complex~$L$.  Thus $C_1$ is
the abelian group generated by the paths $e_1(r)$, the subgroup
$Z_1$ is the kernel of the map that sends
$e_1(r)=\pi(r(\infty),r(0))$ to $\pi(r(0))-\pi((\infty))$, and
$B_1$ is the subgroup of $Z_1$ generated by boundaries of
$2$-cycles.

Let $C, Z, B$ be as defined before the statement of the
Theorem~\ref{thm:maninsymbols}.   We have $\H_1(X(G),\Z) \isom
Z_1/B_1$, and would like to prove that $Z/B \isom Z_1/B_1$.

Define a map $\vphi:C\to C_1$ by $(r)\mapsto e_1(rs) - e_1(r)$.
The map~$\vphi$ is well defined because if $r=rs$, then clearly
$(r)\mapsto 0$, and $(r)+(rs)$ maps to $e_1(rs)-e_1(r) + e_1(r) -
e_1(rs)=0$. To see that $f$ is injective, suppose $\sum n_r
(r)\neq 0$. Since in $C$ we have the relations $(r)=-(rs)$ and
$(r)=0$ if $rs=r$, we may assume that $n_r n_{rs}=0$ for all~$r$.
We have
\[
  \vphi\left(\sum n_r (r)\right) = \sum n_r(e_1(rs) - e_1(r)).
\]
If $n_r\neq 0$ then $r\neq rs$, so (\ref{eqn:differentcycles})
implies that $e_1(r)\neq e_1(rs)$. If $n_r\neq 0$ and $n_{r'}\neq
0$ with $r'\neq r$, then $r\neq rs$ and $r'\neq r's$, so $e_1(r),
e_1(rs), e_1(r'), e_1(r's)$ are all distinct.  We conclude that
$\sum n_r(e_1(rs) - e_1(r))\neq 0$, which proves that $\vphi$ is
injective.

Suppose $(r)\in C$. Then $$\vphi(r) + B_1 = \psi(r) =
\{r(0),r(\infty)\} \in \H_1(X(G),\Z)=C_1/B_1,$$ since $$\vphi(r) =
e_1(rs) - e_1(r) = \pi(rs(\infty),rs(i)) - \pi(r(\infty),r(i)) =
\pi(r(0),r(i)) - \pi(r(\infty),r(i))$$ belongs to the homology
class $\{r(0),r(\infty)\}$.   Extending linearly, we have, for any
$z\in C$, that $\vphi(z) + B_1 = \psi(z)$.

The generators for $B_1$ are the boundaries of $2$-cells $e_2(r)$.
 As we saw above, these have the form $\vphi(r)$ for all $r$ such that
 $r=rt$, and $\vphi(r)+\vphi(rt)+\vphi(rt^2)$ for the $r$ such that $rt\neq r$.
Thus $B_1 = \vphi(B)\subset \vphi(Z)$, so the map $\vphi$ induces
an injection $Z/B \hra Z_1/B_1$.   This completes the proof of the
theorem.

\end{proof}

\section{Hecke operators}
In this section we will only consider the modular curve $X_0(N)$
associated to the subgroup $\Gamma_0(N)$ of $\SL_2(\Z)$ of
matrices that are upper triangular modulo~$N$. Much of what we say
will also be true, possibly with slight modification, for
$X_1(N)$, but not for arbitrary finite-index subgroups.

There is a commutative ring $$\T=\Z[T_1,T_2,T_3,\ldots]$$ of {\em
Hecke operators} that acts on $\H_1(X_0(N),\R)$.  We will
frequently revisit this ring, which also acts on the Jacobian
$J_0(N)$ of $X_0(N)$, and on modular forms.   The ring $\T$ is
generated by $T_p$, for $p$ prime, and as a free $\Z$-module $\T$
is isomorphic to $\Z^g$, where $g$ is the genus of $X_0(N)$.  We
will not prove these facts here (see \edit{Add some references and
pointers to other parts of this book.}).

Suppose $$\{\alpha,\beta\}\in\H_1(X_0(N),\R),$$ is a modular
symbol, with $\alpha,\beta\in\P^1(\Q)$.  For $g\in \M_2(\Z)$,
write $g(\{\alpha,\beta\}) = \{g(\alpha),g(\beta)\}$. This is {\bf
not} a well-defined action of $\M_2(\Z)$ on $\H_1(X_0(N),\R)$,
since $\{\alpha',\beta'\}=\{\alpha,\beta\}\in\H_1(X_0(N),\R)$ does
not imply that $\{g(\alpha'),g(\beta')\}=\{g(\alpha),g(\beta)\}$.

\begin{example}\label{ex:welldefmodsym}
Using \magma{} we see that the homology $\H_1(X_0(11),\R)$ is
generated by $\{-1/7,0\}$ and $\{-1/5,0\}$.
\begin{verbatim}
> M := ModularSymbols(11);   // Homology relative to cusps,
                             // with Q coefficients.
> S := CuspidalSubspace(M);  // Homology, with Q coefficients.
> Basis(S);
[ {-1/7, 0}, {-1/5, 0} ]
\end{verbatim}
Also, we have $5\{0,\infty\} =\{-1/5,0\}.$
\begin{verbatim}
> pi := ProjectionMap(S);    // The natural map M --> S.
> M.3;
{oo, 0}
> pi(M.3);
-1/5*{-1/5, 0}
\end{verbatim}
Let $g=\smallmtwo{2}{0}{0}{1}$.  Then $5\{g(0),g(\infty)\}$ is not
equal to $\{g(-1/5),g(0)\}$, so $g$ does not define a well-defined
map on $\H_1(X_0(11),\R)$.
\begin{verbatim}
> x := 5*pi(M!<1,[Cusps()|0,Infinity()]>);
> y := pi(M!<1,[-2/5,0]>);
> x;
{-1/5, 0}
> y;
-1*{-1/7, 0} + -1*{-1/5, 0}
> x eq y;
false
\end{verbatim}
\end{example}

\begin{definition}[Hecke operators]
We define the {\em Hecke operator} $T_p$ on $\H_1(X_0(N),\R)$ as
follows. When $p$ is a prime with $p\nmid N$, we have
\[
 T_p(\{\alpha,\beta\}) = \mtwo{p}{0}{0}{1}(\{\alpha,\beta\}) + \sum_{r=0}^{p-1}\mtwo{1}{r}{0}{p}(\{\alpha,\beta\}).
\]
When $p\mid N$, the formula is the same, except that the first
summand, which involves $\smallmtwo{p}{0}{0}{1}$, is omitted.
\end{definition}

\begin{example}\label{ex:heckeopmodsym}
We continue with Example~\ref{ex:welldefmodsym}. If we apply the Hecke operator
$T_2$ to both $5\{0,\infty\}$ and $\{-1/5,0\}$, the
``non-well-definedness'' cancels out.
\begin{verbatim}
> x := 5*pi(M!<1,[Cusps()|0,Infinity()]> +
     M!<1,[Cusps()|0,Infinity()]> + M!<1,[Cusps()|1/2,Infinity()]>);
> x;
-2*{-1/5, 0}
> y := pi(M!<1,[-2/5,0]>+ M!<1,[-1/10,0]> + M!<1,[2/5,1/2]>);
> y;
-2*{-1/5, 0}
\end{verbatim}
\end{example}

Examples~\ref{ex:welldefmodsym} shows that it is not clear that
the definition of $T_p$ given above makes sense.  For example, if
$\{\alpha,\beta\}$ is replaced by an equivalent modular symbol
$\{\alpha',\beta'\}$, why does the formula for $T_p$ give the same
answer? We will not address this question further here, but will
revisit it later\edit{Say where, when I write this later.} when we
have a more natural and intrinsic definition of Hecke operators.
We only remark that $T_p$ is induced by a ``correspondence'' from
$X_0(N)$ to $X_0(N)$, so $T_p$ preserve $\H_1(X_0(N),\Z)$.

\section{Modular symbols and rational homology}
In this section we sketch a beautiful proof, due to Manin, of a
result that is crucial to our understanding of rationality
properties of special values of $L$-functions.  For example, Mazur
and Swinnerton-Dyer write in
\cite[\S6]{mazur-swinnerton-dyer:arithmetic}, ``The modular symbol
is essential for our theory of $p$-adic Mellin transforms,'' right
before discussing this rationality result.  Also, as we will see
in the next section, this result implies that if $E$ is an
elliptic curve over~$\Q$, then $L(E,1)/\Omega_E\in\Q$, which
confirms a consequence of the Birch and Swinnerton-Dyer
conjecture.

\begin{theorem}[Manin]\label{thm:maninrat}
For any $\alpha,\beta\in\P^1(\Q)$, we have
\[\{\alpha,\beta\}\in\H_1(X_0(N),\Q).\]
\end{theorem}
\begin{proof}[Proof (sketch)]
Since $\{\alpha,\beta\} = \{\alpha,\infty\}-\{\beta,\infty\}$, it
suffices to show that $\{\alpha,\infty\}\in\H_1(X_0(N),\Q)$ for
all $\alpha\in\Q$. We content ourselves with proving that
$\{0,\infty\}\in\H_1(X_0(N),\Z)$, since the proof for general
$\{0,\alpha\}$ is almost the same.

We will use that the eigenvalues of $T_p$ on $\H_1(X_0(N),\R)$
have absolute value bounded by $2\sqrt{p}$, a fact that was proved
by Weil (the Riemann hypothesis for curves over finite fields).
Let $p\nmid N$ be a prime. Then
\[
  T_p(\{0,\infty\}) = \{0,\infty\} + \sum_{r=0}^{p-1} \left\{\frac{r}{p},\infty\right\}
    = (1+p)\{0,\infty\} + \sum_{r=0}^{p-1} \left\{\frac{r}{p},0\right\},
\]
so
\[
  (1+p-T_p)(\{0,\infty\}) = \sum_{r=0}^{p-1} \left\{ 0, \frac{r}{p}\right\}.
\]
Since $p\nmid N$, the cusps $0$ and $r/p$ are equivalent (use the Euclidean
algorithm to find a matrix in $\SL_2(\Z)$ of the form $\smallmtwo{r}{*}{p}{*}$), so
the modular symbols $\{0,r/p\}$, for $r=0,1,\ldots,p-1$ all lie in $\H_1(X_0(N),\Z)$.
Since the eigenvalues of $T_p$ have absolute value at most $2\sqrt{p}$, the
linear transformation $1+p-T_p$ of $\H_1(X_0(N),\Z)$ is invertible.
It follows that some integer multiple of $\{0,\infty\}$ lies
in $\H_1(X_0(N),\Z)$, as claimed.
\end{proof}


There are general theorems about the denominator of
$\{\alpha,\beta\}$ in some cases.  Example~\ref{ex:welldefmodsym}
above demonstrated the following theorem in the case $N=11$.
\begin{theorem}[Ogg \cite{ogg:ratpoints_finiteorder}]
Let $N$ be a prime.  Then the image
$$[\{0,\infty\}] \in \H_1(X_0(N),\Q)/\H_1(X_0(N),\Z)$$ has order equal to the
numerator of $(N-1)/12$.
\end{theorem}

\section{Special values of $L$-functions}
This section is a preview of one of the central arithmetic results we
will discuss in more generality later in this book.\edit{Where?}

The celebrated modularity theorem of Wiles et al. asserts that
there is a correspondence between isogeny classes of elliptic
curves~$E$ of conductor~$N$ and normalized new modular eigenforms
$f=\sum a_n q^n\in S_2(\Gamma_0(N))$ with $a_n\in\Z$. This
correspondence is characterized by the fact that for all primes
$p\nmid N$, we have $a_p = p+1-\#E(\F_p)$.

Recall that a modular form for $\Gamma_0(N)$ of weight~$2$ is a holomorphic function
$f:\h\to\C$ that is ``holomorphic at the cusps'' and such that for all $\abcd\in\Gamma_0(N)$,
\[
  f\left(\frac{az+b}{cz+d}\right) = (cz+d)^{2} f(z).
\]

Suppose~$E$ is an elliptic curve that corresponds to a modular
form~$f$.  If $L(E,s)$ is the $L$-function attached to~$E$, then
\[
  L(E,s) = L(f,s) = \sum \frac{a_n}{n^s},
\]
so, by a theorem of Hecke which we will prove [later]\edit{where?}, $L(f,s)$
is holomorphic on all~$\C$.  Note that $L(f,s)$ is the Mellin transform of the
modular form~$f$:
\begin{equation}\label{eqn:mellin}
  L(f,s) = (2\pi)^s\Gamma(s)^{-1}\int_{0}^{i\infty} (-iz)^s f(z)\frac{dz}{z}.
\end{equation}

The Birch and Swinnerton-Dyer conjecture concerns the leading coefficient
of the series expansion of $L(E,s)$ about $s=1$.  A special case is that
if $L(E,1)\neq 0$, then
\[
\frac{L(E,1)}{\Omega_E} = \frac{\prod c_p \cdot \#\Sha(E)}{\#E(\Q)_{\tor}^2}.
\]
Here $\Omega_E = |\int_{E(\R)} \omega|,$ where $\omega$ is a
``N\'eron'' differential $1$-form on $E$, i.e., a generator for
$\H^0(\cE,\Omega^1_{\cE/\Z})$, where $\cE$ is the N\'eron model
of~$E$.  (The N\'eron model of $E$ is the unique, up to unique
isomorphism, smooth group scheme $\cE$ over $\Z$, with generic
fiber $E$, such that for all smooth schemes~$S$ over~$\Z$, the
natural map $\Hom_\Z(S,\cE)\to \Hom_\Q(S\cross \Spec(\Q),E)$ is an
isomorphism.)  In particular, the conjecture asserts that for any
elliptic curve~$E$ we have $L(E,1)/\Omega_E\in\Q.$

\begin{theorem}
Let $E$ be an elliptic curve over~$\Q$.  Then $L(E,1)/\Omega_E\in\Q$.
\end{theorem}
\begin{proof}[Proof (sketch)]
By the modularity theorem of Wiles et al., $E$ is modular, so
there is a surjective morphism $\pi_E : X_0(N)\to E$, where $N$ is
the conductor of~$E$.  This implies that there is a newform~$f$
that corresponds to (the isogeny class of)~$E$, with
$L(f,s)=L(E,s)$.   Also assume, without loss of generality, that
$E$ is ``optimal'' in its isogeny class, which means that if
$X_0(N)\to E'\to E$ is a sequence of morphism whose composition is
$\pi_E$ and $E'$ is an elliptic curve, then $E'=E$.

By Equation~\ref{eqn:mellin}, we have
\begin{equation}\label{eqn:l1}
  L(E,1) = 2\pi\int_{0}^{i\infty} -iz f(z) dz/z.
\end{equation}
If $q=e^{2\pi i z}$, then $dq=2\pi i q dz$, so $2\pi i f(z) dz =
dq/q$, and (\ref{eqn:l1}) becomes
\[
  L(E,1) = -\int_{0}^{i\infty} f(q) dq.
\]
Recall that $\Omega_E = |\int_{E(\R)} \omega|$, where $\omega$ is a
N\'eron differential on $E$.  The expression $f(q) dq$ defines a
differential on the modular curve $X_0(N)$, and there is a rational
number $c$, the {\em Manin constant}, such that $\pi_E^*\omega = c
f(q) dq$.  More is true: Edixhoven proved (as did Ofer Gabber) that
$c\in\Z$; also Manin conjectured that $c=1$ and Edixhoven proved
(unpublished) that if $p\mid c$, then $p=2,3,5,7$.

A standard fact is that if
\[
 \cL = \left\{ \int_{\gamma} \omega \,:\, \gamma\in\H_1(E,\Z) \right\}
\]
is the period lattice of $E$ associated to $\omega$,
then $E(\C)\isom \C/\cL$.  Note that $\Omega_E$ is either
the least positive real element of $\cL$ or twice this
least positive element (if $E(\R)$ has two real components).

The next crucial observation is that by Theorem~\ref{thm:maninrat},
there is an integer~$n$ such that $n\{0,\infty\}\in\H_1(X_0(N),\Z)$.
This is relevant because if
\[
   \cL' = \left\{ \int_{\gamma} f(q)dq \,:\, \gamma\in\H_1(X_0(N),\Z)\right\} \subset \C.
\]
then $\cL=\frac{1}{c}\cL'\subset \cL'$.  This assertion follows from
our hypothesis that $E$ is optimal and standard facts about complex
tori and Jacobians, which we will prove later [in this course/book].

One can show that $L(E,1)\in\R$, for example, by writing down an explicit
real convergent series that converges to $L(E,1)$.  This series is used
in algorithms to compute $L(E,1)$, and the derivation of the series uses
properties of modular forms that we have not yet developed.  Another approach
is to use complex conjugation to define an involution $*$ on
$\H_1(X_0(N),\R)$, then observe that $\{0,\infty\}$ is fixed by $*$.
(The involution $*$ is given on modular symbols by
$*\{\alpha,\beta\} = \{-\alpha,-\beta\}$.)

Since $L(E,1)\in\R$, the integral
\[\int_{n\{0,\infty\}} f(q) dq = n\int_{0}^{i\infty} f(q) dq=-n L(E,1)\in\cL'\]
lies in the subgroup $(\cL')^+$ of elements fixed by complex
conjugation. If $c$ is the Manin constant, we have
$cnL(E,1)\in\cL^+$.  Since $\Omega_E$ is the least nonzero element
of $\cL^+$ (or twice it), it follows that
$2cnL(E,1)/\Omega_E\in\Z$, which proves the proposition.
\end{proof}
\chapter{Modular Forms of Higher Level}

\section{Modular Forms on $\Gamma_1(N)$}

\comment{
\begin{remark}
Let $n$ be a positive integer. If $(n,N)=1$, then the $T_n$ behave
like they do for $\sltwoz$. In fact, the $T_n$ and $\dbd{d}$ commute and
$$(f|T_n,g)=(f,g|\dbd{n}^{-1}T_n)$$
$$(f|\dbd{d},g)=(f,g|\dbd{d}^{-1})$$
so the $T_n$ (for $n$ prime to $N$) and $\dbd{d}$ are
simultaneously diagonalizable. But if
$(n,N)\neq{}1$ then $T_n$ may not be diagonalizable.
\end{remark}
}

Fix integers $k\geq 0$ and $N\geq 1$.  Recall that $\Gamma_1(N)$
is the subgroup of elements of $\SL_2(\Z)$ that are of the form
$\smallmtwo{1}{*}{0}{1}$ when reduced modulo~$N$.
\begin{definition}[Modular Forms]
The space of {\em modular forms} of level~$N$ and weight~$k$ is
\[
   M_k(\Gamma_1(N)) = \left\{ f : f(\gamma \tau) = (c\tau+d)^{k}f(\tau) \text{ all }
                            \gamma \in \Gamma_1(N) \right\},
\]
where the~$f$ are assumed holomorphic on $\sH\union\{\text{cusps}\}$ (see below for
the precise meaning of this).  The space of {\em cusp forms} of level~$N$ and weight~$k$
is the subspace $S_k(\Gamma_1(N))$ of $M_k(\Gamma_1(N))$ of modular forms that vanish
at all cusps.
\end{definition}

\begin{remark}
  In the beginning of this book (e.g., Section~\ref{sec:modformintro})
  we often wrote $S_k(N)$ for $S_k(\Gamma_1(N))$.  Since there are 
  many congruence subgroups, to avoid confusion we will write out
  $S_k(\Gamma_1(N))$ in the rest of this book.
\end{remark}

Suppose $f\in M_k(\Gamma_1(N))$. The group $\Gamma_1(N)$ contains
the matrix $\smallmtwo{1}{1}{0}{1}$, so $$f(z+1)=f(z),$$ and
for~$f$ to be holomorphic at infinity means that~$f$ has a Fourier
expansion
\[
   f = \sum_{n=0}^{\infty} a_n q^n.
\]

To explain what it means for~$f$ to be holomorphic at all cusps,
we introduce some additional notation.  For
$\alpha\in\GL_2^{+}(\R)$ and $f:\h\to\C$ define another function
$f_{|[\alpha]_k}$ as follows:
\[\
   f_{|[\alpha]_k}(z) = \det(\alpha)^{k-1} (cz+d)^{-k}
   f(\alpha{}z).
\]
It is straightforward to check that $f_{|[\alpha\alpha']_k} =
(f_{|[\alpha]_k})_{|[\alpha']_k}$.  Note that we do not have to
make sense of $f_{|[\alpha]_k}(\infty)$, since we only assume
that~$f$ is a function on~$\h$ and not~$\h^*$.

Using our new notation, the transformation condition required for
$f:\h\to\C$ to be a modular form for $\Gamma_1(N)$ of weight~$k$
is simply that $f$ be fixed by the $[\,\,]_k$-action of
$\Gamma_1(N)$. Suppose $x\in\P^1(\Q)$ is a cusp, and choose
$\alpha\in\SL_2(\Z)$ such that $\alpha(\infty)=x$. Then
$g=f_{|[\alpha]_k}$ is fixed by the $[\,\,]_k$ action of
$\alpha^{-1}\Gamma_1(N)\alpha$.
\begin{lemma}
Let $\alpha\in\SL_2(\Z)$.  Then there exists a positive
integer~$h$ such that
$\smallmtwo{1}{h}{0}{1}\in\alpha^{-1}\Gamma_1(N)\alpha$.
\end{lemma}
\begin{proof}
This follows from the general fact that the set of congruence
subgroups of $\SL_2(\Z)$ is closed under conjugation by elements
$\alpha \in \SL_2(\Z)$, and every congruence subgroup contains an
element of the form $\smallmtwo{1}{h}{0}{1}$.   If $G$ is a
congruence subgroup, then $\smallmtwo{1}{N}{0}{1} \in \Gamma(N)\subset G$ for some~$N$, and
$\alpha^{-1}\Gamma(N)\alpha=\Gamma(N)$, since $\Gamma(N)$ is
normal, so $\Gamma(N)\subset \alpha^{-1} G \alpha$.
\end{proof}

Letting~$h$ be as in the lemma, we have $g(z+h)=g(z)$. Then the
condition that~$f$ be holomorphic at the cusp~$x$ is that
\[
   g(z) = \sum_{n\geq 0} b_{n/h} q^{1/h}
\]
on the upper half plane.  We say that~$f$ vanishes at~$x$ if
$b_{0}=0$, and a {\em cusp form} is a form that vanishes at every cusp.

\section{Diamond bracket and Hecke operators}
In this section we consider the spaces of modular forms
$S_k(\Gamma_1(N),\eps)$,
for Dirichlet characters~$\eps$ mod~$N$, and explicitly
describe the action of the Hecke operators
on these spaces.

\subsection{Diamond bracket operators}


The group $\Gamma_1(N)$ is a normal subgroup of $\Gamma_0(N)$, and
the quotient $\Gamma_0(N)/\Gamma_1(N)$ is isomorphic to
$(\Z/N\Z)^*$.  From this structure we obtain an action of
$(\Z/N\Z)^*$ on $S_k(\Gamma_1(N))$, and use it to decompose
$S_k(\Gamma_1(N))$ as a direct sum of more  manageable chunks
$S_k(\Gamma_1(N),\eps)$.


\begin{definition}[Dirichlet character]
A {\em Dirichlet character} $\eps$ modulo~$N$ is a homomorphism
\[
  \eps:(\Z/N\Z)^{*}\into\C^{*}.
\]
We extend $\eps$ to a map $\eps:\Z\to\C$ by setting $\eps(m)=0$ if
$(m,N)\neq 1$ and $\eps(m)=\eps(m\text{ mod }N)$ otherwise.  If
$\eps:\Z\to \C$ is a Dirichlet character, the {\em conductor} of
$\eps$ is the smallest positive integer~$c$ such that $\eps$
arises from a homomorphism $(\Z/c\Z)^*\to\C^*$.
\end{definition}

\begin{remarks}\mbox{}\\
\begin{enumerate}
\item If $\eps$ is a Dirichlet character modulo~$N$ and $M$ is a
multiple of~$N$ then~$\eps$ induces a Dirichlet character mod~$M$.
If $M$ is a divisor of $N$ then $\eps$ is induced by a Dirichlet
character modulo~$M$ if and only if~$M$ divides the
conductor of~$\eps$.%
\item The set of Dirichlet characters forms a group, which is
non-canonically isomorphic to $(\Z/N\Z)^*$ (it is the dual of this
group).
%
\item The mod~$N$ Dirichlet characters all take values in
$\Q(e^{2\pi i/e})$ where~$e$ is the exponent of~$(\Z/N\Z)^*$.
When~$N$ is an odd prime power, the group $(\Z/N\Z)^*$ is cyclic,
so $e = \varphi(\varphi(N))$. This double-$\vphi$ can sometimes cause confusion.%
\item There are many ways to represent Dirichlet characters with a
computer (see, e.g., \cite[Ch.~4]{stein:book}).  One way is to fix
generators for $(\Z/N\Z)^*$ in any way you like and represent
$\eps$ by the images of each of these generators.   Assume for the
moment that~$N$ is odd. To make the representation more
``canonical'', reduce to the prime power case by writing
$(\Z/N\Z)^*$ as a product of cyclic groups corresponding to prime
divisors of~$N$.  A ``canonical'' generator for $(\Z/p^r\Z)^*$ is
then the smallest positive integer~$s$ such that $s\text{ mod
}p^r$ generates $(\Z/p^r\Z)^*$.   Store the character that
sends~$s$ to $e^{2\pi i n/\vphi(\vphi(p^r))}$ by storing the
integer $n$. For general~$N$, store the list of integers $n_p$,
one~$p$ for each prime divisor of~$N$ (unless $p=2$, in which case
you store two integers $n_2$ and $n_2'$, where $n_2\in\{0,1\}$).
\end{enumerate}
\end{remarks}


\begin{definition}
Let $\overline{d}\in(\Z/N\Z)^{*}$ and $f\in S_k(\Gamma_1(N))$. 
By Lemma~\ref{lem:red}, the map $\SL_2(\Z)\to\SL_2(\Z/N\Z)$ is surjective,  so there exists a matrix
$\gamma=\smallmtwo{a}{b}{c}{d}
        \in\Gamma_0(N)$
such that $d\con\overline{d}\pmod{N}$. The {\em
diamond bracket $d$ operator} is then
\[
 f(\tau)|\dbd{d} = f_{|[\gamma]_k} =  f(\gamma\tau)(c\tau+d)^{-k}.
\]
\end{definition}

%\begin{remark}
%\edit{Remove from book.}
%Fred Diamond was named after diamond bracket operators.
%\end{remark}

The definition of $\dbd{d}$ does not depend on the choice of lift matrix
$\smallmtwo{a}{b}{c}{d}$, since any two lifts differ by an element of
$\Gamma(N)$ and $f$ is fixed by $\Gamma(N)$ since it is fixed by $\Gamma_1(N)$.

For each Dirichlet character $\eps$ mod $N$ let
\begin{align*}
  S_k(\Gamma_1(N),\eps) &=
          \{ f : f|\dbd{d} =
         \eps(d) f
             \text{ all } d\in(\Z/N\Z)^* \}\\
&=
        \{ f : f_{|[\gamma]_k} = \eps(d_\gamma) f
             \text{ all } \gamma  \in \Gamma_0(N) \},
\end{align*}
where $d_\gamma$ is the lower-right entry of~$\gamma$.

When $f\in{}S_k(\Gamma_1(N),\eps)$, we say that~$f$
has {\em Dirichlet character}~$\eps$.  In the literature, sometimes~$f$ is said to
be of ``nebentypus'' $\eps$.

\begin{lemma}
 The operator $\dbd{d}$ on the finite-dimensional vector
space $S_k(\Gamma_1(N))$ is diagonalizable.
\end{lemma}
\begin{proof}
There exists~$n\geq 1$ such that $I=\dbd{1}=\dbd{d^n}=\dbd{d}^n$, so the
characteristic polynomial of $\dbd{d}$ divides the square-free
polynomial $X^n-1$.
\end{proof}
Note that $S_k(\Gamma_1(N),\eps)$ is the $\eps(d)$ eigenspace of $\dbd{d}$.
Thus we have a direct sum decomposition
\[
S_k(\Gamma_1(N))=\bigoplus_{\eps:(\Z/N\Z)^{*}\into\C^{*}}
                             S_k(\Gamma_1(N),\eps).
\]

We have
 $\smallmtwo{-1}{\hfill 0}{\hfill 0}{-1}\in\Gamma_0(N),$
so if $f\in{}S_k(\Gamma_1(N),\eps)$, then
$$f(\tau)(-1)^{-k}=\eps(-1)f(\tau).$$
Thus $S_k(\Gamma_1(N),\eps)=0$, unless $\eps(-1)=(-1)^{k}$,
so about half of the direct summands $S_k(\Gamma_1(N),\eps)$
vanish.

\subsection{Hecke operators on $q$-expansions}\label{sec:heckeqN}
Suppose
\[
  f=\sum_{n=1}^{\infty}a_n q^n \in S_k(\Gamma_1(N),\eps),
\]
and let~$p$ be a prime.
Then
\[
f|T_p = \begin{cases}
\displaystyle
\sum_{n=1}^{\infty} a_{np}q^n + p^{k-1}\eps(p)
                   \sum_{n=1}^{\infty} a_n{}q^{pn},  &p\nd N\\
\displaystyle
\sum_{n=1}^{\infty} a_{np}q^n + 0. &p\mid N.
\end{cases}
\]
Note that $\eps(p)=0$ when $p\mid N$, so the second part of the formula
is redundant.

When $p\mid{}N$, $T_p$ is often denoted $U_p$ in the literature,
but we will not do so here. Also, the ring $\T$ generated by the
Hecke operators is commutative, so it is harmless, though
potentially confusing, to write $T_p(f)$ instead of $f|T_p$.

We record the relations
\begin{align*}
T_mT_n&=T_{mn},\quad (m,n)=1,\\%
 T_{p^k}&=\begin{cases}
   (T_p)^k, & p\mid N\\
   T_{p^{k-1}}T_p - \eps(p)p^{k-1}T_{p^{k-2}}, & p\nd N.
\end{cases}
\end{align*}

\noindent{\bf WARNING:} When $p\mid N$, the operator $T_p$ on
$S_k(\Gamma_1(N),\eps)$ need not be diagonalizable.


\section{Old and new subspaces}
Let $M$ and $N$ be positive integers such that $M\mid{}N$ and let
$t\mid{}\frac{N}{M}$. If $f(\tau)\in S_k(\Gamma_1(M))$ then
$f(t\tau)\in{}S_k(\Gamma_1(N))$. We thus have maps
\[
  S_k(\Gamma_1(M))\into{}S_k(\Gamma_1(N))
\]
for each divisor $t\mid \frac{N}{M}$. Combining these gives a map
\[
  \varphi_M:\bigoplus_{t\mid (N/M)}
     S_k(\Gamma_1(M))\into S_k(\Gamma_1(N)).
\]

\begin{definition}[Old Subspace] The {\em old subspace} of $S_k(\Gamma_1(N))$ is the subspace
generated by the images of the $\varphi_M$ for all $M\mid N$ with $M\neq N$.
\end{definition}

\begin{definition}[New Subspace]
  The {\em new subspace} of $S_k(\Gamma_1(N))$ is the complement of
  the old subspace with respect to the Petersson inner product (see
  Section~\ref{sec:petersson}).
\end{definition}

\todo{We only defined the Petersson inner product in Section~\ref{sec:petersson} in 
the case when $N=1$.}

% \edit{Remove from book.} Since I haven't introduced the Petersson
% inner product yet, note that the new subspace of
% $S_k(\Gamma_1(N))$ is the largest subspace of $S_k(\Gamma_1(N))$
% that is stable under the Hecke operators and has trivial
% intersection with the old subspace of $S_k(\Gamma_1(N))$.

\begin{definition}[Newform]
A {\em newform} is an element $f$ of the new subspace of
$S_k(\Gamma_1(N))$ that is an eigenvector for every Hecke
operator, which is normalized so that the coefficient of $q$
in~$f$ is~$1$.
\end{definition}

If $f=\sum a_n q^n$ is a newform then the coefficients $a_n$ are
algebraic integers, which have deep arithmetic significance. For
example, when~$f$ has weight~$2$, there is an associated abelian
variety $A_f$ over~$\Q$ of dimension $[\Q(a_1,a_2,\ldots):\Q]$ such
that $\prod L(f^{\sigma},s)=L(A_f,s)$, where the product is over the
$\Gal(\Qbar/\Q)$-conjugates of~$f$.  The abelian variety~$A_f$ was
constructed by Shimura as follows.  Let $J_1(N)$ be the Jacobian of
the modular curve $X_1(N)$.  As we will see, the ring $\T$ of Hecke
operators acts naturally on $J_1(N)$.  Let $I_f$ be the kernel of the
homomorphism $\T\to \Z[a_1,a_2,\ldots]$ that sends $T_n$ to $a_n$.
Then
\[
    A_f = J_1(N)/I_f J_1(N).
\]

In the converse direction, it is a deep theorem of Breuil, Conrad,
Diamond, Taylor, and Wiles that if $E$ is any elliptic curve
over~$\Q$, then $E$ is isogenous to $A_f$ for some $f$ of level equal
to the conductor $N$ of~$E$.  More generally, building on this work,
it is now known that if $A$ is a simple abelian variety over $\Q$ with
$\End(A)\tensor\Q$ a number field of degree $\dim(A)$, then $A$ is
isogenous to $A_f$ for some newform $f$ (see \cite{ribet:abvars,
  khare-wintenberger:serre1}).

When~$f$ has weight greater than~$2$, in \cite{scholl:motivesinvent}
Scholl constructs, in an analogous way, a Grothendieck motive
$\mathcal{M}_f$ attached to~$f$.

%% Note; he goes on to map S_k(\Gamma_1(N))^2\into S_k(\Gamma_1(pN))

\chapter{Newforms and Euler Products}

In this chapter we discuss the work of Atkin, Lehner, and W.~Li on
newforms and their associated $L$-series and Euler products.  Then we
discuss explicitly how $U_p$, for $p\mid N$, acts on old forms, and
how $U_p$ can fail to be diagonalizable.  Then we describe a canonical
generator for $S_k(\Gamma_1(N))$ as a free module over $\T_\C$.
Finally, we observe that the subalgebra of $\T_\Q$ generated by Hecke
operators $T_n$ with $(n,N)=1$ is isomorphic to a product of number
fields.


\section{Atkin-Lehner-Li theory}\label{sec:atkin}
The results of \cite{winnie:newforms} about newforms are proved
using many linear transformations that do not necessarily preserve
$S_k(\Gamma_1(N),\eps)$.   Thus we introduce more general spaces of
cusp forms, which these transformations preserve.
These spaces are also useful because they make precise how the
space of cusp forms for the principal congruence subgroup 
$$
  \Gamma(N) = \ker(\sltwoz\to \SL_2(\Z/N\Z))
$$
can be understood in terms of spaces $S_k(\Gamma_1(M),\eps)$ for
various~$M$ and~$\eps$, which justifies our usual focus on these
latter spaces.  This section follows \cite{winnie:newforms}
closely.

Let $M$ and $N$ be positive integers and define
\[
\Gamma_0(M,N) = \left\{ \mtwo{a}{b}{c}{d} \in\sltwoz \,:\,\, M\mid
c, N\mid b\right\},
\]
and
\[
\Gamma(M,N) = \left\{ \mtwo{a}{b}{c}{d}\in\Gamma_0(M,N) \,:\,\, a
\con d\con 1\pmod{MN}\right\}.
\]
Note that $\Gamma_0(M,1) = \Gamma_0(M)$ and $\Gamma(M,1)=
\Gamma_1(M)$.  Let $S_k(M,N)$ denote the space of cusp forms for
$\Gamma(M,N)$.

If $\eps$ is a Dirichlet character modulo $MN$ such that
$\eps(-1)=(-1)^k$, let $S_k(M,N, \eps)$ denote the space of all
cups forms for $\Gamma(M,N)$ of weight~$k$ and character~$\eps$.
This is the space of holomorphic functions $f:\h\to \C$ that
satisfy the usual vanishing conditions at the cusps and such that
for all $\abcd\in\Gamma_0(M,N)$,
\[
  f|\mtwo{a}{b}{c}{d} = \eps(d) f.
\]
 We have
\[
   S_k(M,N) = \oplus_{\eps} S_k(M,N,\eps).
\]


We now introduce operators between various $S_k(M,N)$.  Note that,
except when otherwise noted, the notation we use for these
operators below is as in \cite{winnie:newforms}, which conflicts
with notation in various other books.  When in doubt, check the
definitions.

Let
\[
  f|\mtwo{a}{b}{c}{d}(\tau) = (ad-bc)^{k/2} (c\tau+d)^{-k}
  f\left(\frac{a\tau+b}{c\tau+d}\right).
\]
This is like before, but we omit the weight~$k$ from the bar notation,
since~$k$ will be fixed for the whole discussion.

For any $d$ and $f\in S_k(M,N,\eps)$, define
\[
  f|U_d^N = d^{k/2-1} f \Big| \left(\,\sum_{u \text{ mod } d}
  \mtwo{1}{uN}{0}{d}\right),
\]
where the sum is over {\em any} set $u$ of representatives
for the integers modulo~$d$.
Note that the~$N$ in the notation $U_d^N$ is a superscript, not a power
of~$N$. Also, let
\[
  f|B_d = d^{-k/2} f|\mtwo{d}{0}{0}{1},
\]
and
\[
  f|C_d = d^{k/2} f|\mtwo{1}{0}{0}{d}.
\]
In \cite{winnie:newforms}, $C_d$ is denoted $W_d$, which would be confusing,
since in the literature $W_d$ is usually used to denote a completely different
operator (the Atkin-Lehner operator, which is denoted $V_d^M$ in \cite{winnie:newforms}).


Since $\smallmtwo{1}{N}{0}{1}\in\Gamma(M,N)$, any $f\in S_k(M,N,\eps)$
has a Fourier expansion in terms of powers of $q_N = q^{1/N}$. We
have
\[
   \left(\sum_{n\geq 1} a_n q_N^n\right)|U_d^N = \sum_{n\geq 1} a_{nd} q_N^n,
\]
\[
   \left(\sum_{n\geq 1} a_n q_N^n\right)|B_d = \sum_{n\geq 1} a_{n} q_N^{nd},
\]
and
\[
   \left(\sum_{n\geq 1} a_n q_N^n\right)|C_d = \sum_{n\geq 1} a_{n} q_{Nd}^{n}.
\]
The second two equalities are easy to see; for the first, write
everything out and use that for $n\geq 1$,
the sum $\sum_{u} e^{2\pi i un/d}$ is~$0$ or~$d$
if $d\nmid n$, $d\mid n$, respectively, much as
in Section~\ref{sec:heckeonq}.

The maps $B_d$ and $C_d$ define injective maps between various
spaces $S_k(M,N,\eps)$.  To understand $B_d$, use the matrix
relation
\[
  \mtwo{d}{0}{0}{1} \mtwo{x}{y}{z}{w}  = \mtwo{x}{dy}{z/d}{w}
  \mtwo{d}{0}{0}{1},
\]
and for $C_d$ use
\[
  \mtwo{1}{0}{0}{d} \mtwo{x}{y}{z}{w}  = \mtwo{x}{y/d}{zd}{w}
  \mtwo{1}{0}{0}{d}.
\]
% SAGE
%R.<x,y,z,w,d> = QQ[]
%D = matrix(2,[d,0,0,1]) 
%X = matrix(2,[x,y,z,w])
%D*X*D^(-1)
% D = matrix(2,[1,0,0,d]) 
% X = matrix(2,[x,y,z,w])
% D*X*D^(-1)
If $d\mid N$ then $B_d:S_k(M,N,\eps)\to S_k(dM,N/d,\eps)$ is an
isomorphism, and if $d\mid M$, then $C_d:S_k(M,N)\to
S_k(M/d,Nd,\eps)$ is also an isomorphism. In particular, taking
$d=N$, we obtain an isomorphism
\begin{equation}\label{eqn:bniso}
  B_N:S_k(M,N,\eps)\to S_k(MN,1,\eps) = S_k(\Gamma_1(MN),\eps).
\end{equation}
Putting these maps together allows us to completely understand the
cusp forms $S_k(\Gamma(N))$ in terms of spaces
$S_k(\Gamma_1(N^2),\eps)$, for all Dirichlet characters $\eps$ that
arise from characters modulo~$N$.  
This is because
$S_k(\Gamma(N))$ is isomorphic to the direct sum of
$S_k(N,N,\eps)$, as~$\eps$ various over all Dirichlet characters
modulo~$N$.

For any prime~$p$, we define the $p$th {\em Hecke operator}
on $S_k(M,N,\eps)$ by
\[
   T_p = U_p^N + \eps(p) p^{k-1} B_p.
\]
Note that $T_p=U_p^N$ when $p\mid N$, since then $\eps(p)=0$.
In terms of Fourier expansions, we have
\[
   \left(\sum_{n \geq 1} a_n q_N^n\right)|T_p = \sum_{n\geq 1} \left(
    a_{np} + \eps(p) p^{k-1} a_{n/p}\right) q_N^n,
\]
where $a_{n/p}=0$ if $p\nmid n$.

The operators we have just defined satisfy several commutativity relations.
Suppose $p$ and $q$ are prime. Then $T_p B_q = B_q T_p$, $T_p C_q
= C_q T_p$, and $T_p U_q^N = U_q^N T_p$ if $(p,qMN)=1$.  Moreover
$U_d^N B_{d'} = B_{d'} U_d^N$ if $(d,d')=1$.

\begin{remark}
  Because of these relations, (\ref{eqn:bniso}) describes
  $S_k(\Gamma(N))$ as a module over the ring generated by $T_p$ for
  $p\nmid N$.
\end{remark}


\begin{definition}[Old Subspace]
The {\em old subspace} $S_k(M,N,\eps)_{\old}$ is the subspace of
$S_k(M,N,\eps)$ generated by all $f|B_d$ and $g|C_{e}$ where $f\in
S_k(M',N)$, $g\in S_k(M,N')$, and $M', N'$ are proper factors of
$M$, $N$, respectively, and $d\mid M/M'$, $e\mid N/N'$.
\end{definition}

Since $T_p$ commutes with $B_d$ and $C_e$, the Hecke operators
$T_p$ preserve $S_k(M,N,\eps)_{\old}$, for $p\nmid MN$.
Also, $B_N$ defines an isomorphism
\[
  S_k(M,N,\eps)_{\old} \isom S_k(MN,1,\eps)_{\old}.
\]

\begin{definition}[Petersson Inner Product]
If $f, g\in S_k(\Gamma(N))$, the {\em Petersson inner product} of
$f$ and~$g$ is
\[
   \langle f, g\rangle =
      \frac{1}{[\SL_2(\Z) : \Gamma(N)]} \int_{D}
         f(z)\overline{g(z)} y^{k-2}\, dx\, dy,
\]
where $D$ is a fundamental domain for $\Gamma(N)$ and $z=x+ i y$.
\end{definition}
This Petersson pairing is normalized so that if we consider $f$ and $g$ as
elements of $\Gamma(N')$ for some multiple $N'$ of $N$, then the
resulting pairing is the same (since the volume of the fundamental domain
scales by the index).

\begin{theorem}[Petersson]\label{thm:petersson}
If $p\nmid N$ and $f\in S_k(\Gamma_1(N),\eps)$, then $\langle
f|T_p, g \rangle = \eps(p)\langle f, g|T_p\rangle$.
\end{theorem}
See \cite[\S{}VII.5, Thm.~5.1]{lang:modular} for a proof of Theorem~\ref{thm:petersson}.

\begin{remark}
Theorem~\ref{thm:petersson} implies that when $p\nmid N$ the adjoint of $T_p$ 
is $\eps(p) T_p$, so $T_p$ commutes with its adjoint, hence
$T_p$ is {\em normal}, which implies that $T_p$ is diagonalizable.
Be careful, because the $T_p$, with $p\mid N$, need not be diagonalizable
(see Section~\ref{sec:nondiag}).
\end{remark}

\begin{definition}[New Subspace]
The {\em new subspace} $S_k(M,N,\eps)_{\new}$
is the orthogonal complement of $S_k(M,N,\eps)_{old}$ in $S_k(M,N,\eps)$ with respect
to the Petersson inner product.
\end{definition}
Both the old and new subspaces of $S_k(M,N,\eps)$ are preserved by
the Hecke operators $T_p$ with $p\nmid NM$.

\begin{remark}
Li \cite{winnie:newforms} also gives a purely algebraic definition of
the new subspace as the intersection of the kernels of various trace
maps from $S_k(M,N,\eps)$ that are obtained by averaging over
coset representatives.
\end{remark}

\begin{definition}[Newform]
A {\em newform} $f=\sum a_{n} q_N^n \in S_k(M,N,\eps)$ is an element of
$S_k(M,N,\eps)_{\new}$ that is an eigenform for all $T_p$, for
$p\nmid NM$, and is normalized so that $a_1 = 1$.
\end{definition}

Li introduces the crucial ``Atkin-Lehner operator'' $W_q^M$ (denoted
$V_q^M$ in \cite{winnie:newforms}), which plays a key
roll in all the proofs, and is defined as follows.  For a positive integer~$M$
and prime~$q$, let $\alpha=\ord_q(M)$ and use the extended Euclidean
algorithm to find a choice of integers $x,y,z$ such
that $q^{2\alpha}x - yMz = q^\alpha$.  Then $W_q^M$ is the operator defined
by slashing with the matrix $\mtwo{q^\alpha x}{y}{Mz}{q^\alpha}$.
Li shows that if $f\in S_k(M,1,\eps)$, then $f|W_q^M|W_q^M = \eps(q^\alpha) f$,
so $W_q^M$ is invertible.  Care must be taken, because
the operator $W_q^M$ need not commute with $T_p=U_p^N$, when $p\mid M$.

After proving many technical but elementary lemmas about the operators
$B_d$, $C_d$, $U_p^N$, $T_p$, and $W_q^M$, Li uses the lemmas to
deduce the following theorems, whose proofs are relatively elementary.
%The proofs are all relatively elementary, but there is
%little I can say about them, except that
%you just have to read them.\edit{Remove from book.}

\begin{theorem}
Suppose $f = \sum a_n q_N^n \in S_k(M,N,\eps)$ and $a_n=0$ for all~$n$ with
$\gcd(n,r)=1$, where $r$ is a fixed positive integer.  Then
$f \in S_k(M,N,\eps)_{\old}$.
\end{theorem}
From the theorem we see that if $f$ and $g$ are newforms in
$S_k(M,N,\eps)$, and if for all but finitely many primes $p$, the
$T_p$ eigenvalues of $f$ and $g$ are the same, then $f-g$ is an old
form, so $f-g=0$, hence $f=g$.  Thus the eigenspaces in the new
subspace corresponding to the systems of Hecke eigenvalues associated
to the $T_p$, with $p\nmid MN$, each have dimension~$1$.  This is
known as {\em multiplicity one}.

\begin{theorem}{\em
Let $f = \sum a_n q_N^n$ be a newform in $S_k(M,N,\eps)$, $p$ a
prime with $p\nmid MN$, and $q\mid MN$ a prime.  Then
\begin{enumerate}
\item $f | T_p = a_p f$,  $f|U_q^N = a_q f$, and for all $n\geq 1$,
\begin{align*}
  a_p a_n &= a_{np} + \eps(p)p^{k-1} a_{n/p},\\
  a_q a_n &= a_{nq}.
\end{align*}
If $L(f,s) = \sum_{n\geq 1} a_n n^{-s}$ is the Dirichlet series associated
to $f$, then $L(f,s)$ has an Euler product
\[
  L(f,s) =
  \prod_{\text{primes }p} (1-a_p p^{-s} + \eps(p) p^{k-1}p^{-2s})^{-1}.
\]
Note that when $p\mid NM$, we have 
$1-a_p p^{-s} + \eps(p) p^{k-1}p^{-2s} = 1-a_p p^{-s}$.

\item
\begin{enumerate}
\item If $\eps$ is not induced by a character mod $MN/q$, then $|a_q| = q^{(k-1)/2}$.

\item If $\eps$ is induced by a character mod $MN/q$, then $a_q = 0$ if $q^2\mid MN$, and
$a_q^2 = \eps(q) q^{k-2}$ if $q^2\nmid MN$.
\end{enumerate}
\end{enumerate}}
\end{theorem}




%%%%%%%%%%%%%%%%



\section{The $U_p$ operator}\label{sec:up_explicit}

Let~$N$ be a positive integer and
$M$ a divisor of $N$. For each divisor $d$ of $N/M$ we define
a map
$$
  \alpha_{d}:S_k(\Gamma_1(M))\into S_k(\Gamma_1(N)):\quad{}
                  f(\tau)\mapsto{}f(d\tau).
$$
Thus $\alpha_d$ is just the map $B_d$ from Section~\ref{sec:atkin}.
We verify that $f(d\tau)\in{}S_k(\Gamma_1(N))$ as follows. Recall that
for $\gamma=\abcd$, we write
$$
  (f|[\gamma]_k)(\tau)=\det(\gamma)^{k-1}(cz+d)^{-k}f(\gamma(\tau)).
$$
The transformation condition for~$f$ to be in $S_k(\Gamma_1(N))$
is that $f|[\gamma]_k(\tau)=f(\tau)$.  Let $f(\tau)\in{}S_k(\Gamma_1(M))$ and let
$\iota_d=\bigl(\begin{smallmatrix}d&0\\0&1\end{smallmatrix}\bigr)$. Then
$f|[\iota_d]_k(\tau)=d^{k-1}f(d\tau)$ is a modular form on
$\Gamma_1(N)$ since $\iota_d^{-1}\Gamma_1(M)\iota_d$ contains
$\Gamma_1(N)$. Moreover, if $f$ is a cusp form then so is $f|[\iota_d]_k$.

\begin{proposition}\label{prop:alpha_indep}
If $f\in S_k(\Gamma_1(M))$ is nonzero, then the images
$$\left\{\alpha_d(f) \,:\, d\mid \frac{N}{M}\right\}$$ 
are linearly independent.
\end{proposition}
\begin{proof}
If the $q$-expansion of~$f$ is $\sum a_n q^n$, then the $q$-expansion
of $\alpha_d(f)$ is $\sum a_n q^{dn}$.      The matrix of coefficients
of the $q$-expansions of $\alpha_d(f)$, for $d\mid (N/M)$, is upper
triangular.   Thus the $q$-expansions of the $\alpha_d(f)$ are linearly
independent, hence the $\alpha_d(f)$ are linearly independent, since the
map that sends a cusp form to its $q$-expansion is linear.
\end{proof}

When $p\mid N$, we denote by $U_p$ the Hecke operator $T_p$ acting
on the space $S_k(\Gamma_1(N))$.  For clarity, in this
section only we will denote by $T_{p}^M$, the Hecke operator $T_p\in
\End(S_k(\Gamma_1(M)))$. For $f=\sum a_n q^n\in S_k(\Gamma_1(N))$,
we have
$$
  f|U_p = \sum a_{np} q^n.
$$



Suppose $f=\sum a_n q^n\in S_k(\Gamma_1(M))$ is a normalized eigenform for
all of the Hecke operators $T_n$ and $\dbd{n}$, and~$p$ is a prime
that does not divide~$M$. Then
$$
  f|T_{p}^M=a_p f \quad \text{ and } \quad f|\dbd{p}=\varepsilon(p)f.
$$
Assume $N=p^{r}M$, where~$r\geq 1$ is an integer.
Let
\[
  f_i(\tau)=f(p^i\tau) = \alpha_{p^i}(f),
\]
so $f_0,\ldots,f_r$ are the images of $f$ under the maps
$\alpha_{p^0},\ldots, \alpha_{p^r}$, respectively, and $f=f_0$. We
have
\begin{align*}
f|T_{p}^M & = \sum_{n\geq 1} a_{np}q^n+\varepsilon(p)p^{k-1}\sum a_n{}q^{pn}\\
      & = f_0|U_p + \varepsilon(p)p^{k-1} f_1,
\end{align*}
so
\begin{equation}\label{eqn:f0up}
  f_0|U_p = f|T_{p}^M - \varepsilon(p)p^{k-1}f_1
                 = a_p f_0 - \varepsilon(p)p^{k-1}f_1.
\end{equation}
Also
\[
  f_1|U_p = \left(\sum a_n q^{pn}\right) | U_p = \sum a_n q^n = f_0.
\]
More generally, for any $i\geq 1$, we have $f_i|U_p = f_{i-1}$.

The operator $U_p$ preserves the two dimensional vector space spanned by~$f_0$
and~$f_1$, and the matrix of $U_p$ with respect to the basis $f_0$, $f_1$
is
\[
  A=\mtwo{a_p\hfill}{1}{-\varepsilon(p)p^{k-1}}{0},
\]
which has characteristic polynomial
\begin{equation}\label{eqn:up_charpoly}
  X^2 - a_p X + p^{k-1}\varepsilon(p).
\end{equation}

When $r\geq 3$, the operator $U_p$ does not act diagonalizably on the
space spanned by $f_0, f_1, \ldots, f_r$. See
Section~\ref{sec:nondiag} below.


\subsection{A Connection with Galois representations}\index{Galois representations}
Equation~\eqref{eqn:up_charpoly} leads to a striking connection with
Galois representations.  Let~$f$ be a newform and let~$K=K_f$ be the
field generated over~$\Q$ by the Fourier coefficients of~$f$. Let
$\ell$ be a prime and $\lambda$ a prime of the ring of integers of $K$
lying over $\ell$. Then, as we mentioned in
Section~\ref{sec:modformarith}, Deligne (and Serre, when $k=1$, and
Shimura when $k=2$) constructed a representation
\[
  \rho_{f,\lambda} = \rho_{\lambda}:\Gal(\overline{\Q}/\Q)\into\GL(2,K_{\lambda}).
\]
If $p\nd N\ell$, then $\rho_{\lambda}$ is unramified at~$p$,
so if $\Frob_p\in\Gal(\overline{\Q}/\Q)$ if a Frobenius element,
then $\rho_{\lambda}(\Frob_p)$ is well defined, up to
conjugation.  Moreover, 
\begin{align*}
\det(\rho_{\lambda}(\Frob_p)) &= p^{k-1}\varepsilon(p),\quad\text{and} \\
\tr(\rho_{\lambda}(\Frob_p)) & = a_p.
\end{align*}
%(We will discuss the proof of these relations further in the case
%$k=2$.)
Thus the characteristic polynomial of
$\rho_{\lambda}(\Frob_p)\in\GL_2(K_{\lambda})$ is
\[
  X^2 - a_p X + p^{k-1}\varepsilon(p),
\]
which is the same as (\ref{eqn:up_charpoly}).


\subsection{When is $U_p$ semisimple?}
\begin{question}
Is $U_p$ semisimple on the span of $f_0$ and $f_1$?
\end{question}

If the eigenvalues of $U_p$ acting on the span of $f_0$ and $f_1$ are
distinct, then the answer is yes.  If the eigenvalues are the same,
then $X^2-a_p X+p^{k-1}\varepsilon(p)$ has discriminant~$0$, so
$a_p^2=4p^{k-1}\varepsilon(p)$, hence
\[
 a_p=2p^{\frac{k-1}{2}}\sqrt{\varepsilon(p)}.
\]
\begin{openproblem}
Does there exist an eigenform $f=\sum a_n q^n \in
S_k(\Gamma_1(N))$ such that $a_p
=2p^{\frac{k-1}{2}}\sqrt{\varepsilon(p)}$?
\end{openproblem}

It is a curious fact that the Ramanujan conjectures, which were proved
by Deligne in 1973, imply that $|a_p|\leq 2p^{(k-1)/2}$, so the above
equality remains taunting. When $k=2$, Coleman and Edixhoven proved in
\cite{coleman-edixhoven} that $|a_p|<2p^{(k-1)/2}$.

%\edit{Look in Coleman-edixhoven and say more about this.  Plus
%find the Weil reference. When $k=2$, Weil \cite{ref} showed that
%$\rho_{\lambda}(\Frob_p)$ is semisimple, so if the eigenvalues of
%$U_p$ are equal then $\rho_{\lambda}(\Frob_p)$ is a scalar. But
%Edixhoven and Coleman \cite{edixcole} show that it is not a scalar
%by looking at the abelian variety attached to~$f$.}

\subsection{An Example of non-semisimple $U_p$}\label{sec:nondiag}
Suppose $f=f_0$ is a normalized eigenform.  Let $W$ be the space
spanned by $f_0, f_1$ and let $V$ be the space spanned by $f_0,
f_1, f_2, f_3$. Then $U_p$ acts on $V/W$ by $\overline{f}_2\mapsto 0$
and $\overline{f}_3\mapsto \overline{f}_2$. Thus the matrix of the
action of $U_p$ on $V/W$ is $\smallmtwo{0}{1}{0}{0}$, which is
nonzero and nilpotent, hence not semisimple. Since~$W$ is
invariant under $U_p$ this shows that $U_p$ is not semisimple
on~$V$, i.e., $U_p$ is not diagonalizable.

\section{The Cusp forms are free of rank $1$ over $\T_\C$}

\subsection{Level $1$}
Suppose $N=1$, so $\Gamma_1(N)=\sltwoz$. Using the Petersson
inner product, we see that all the $T_n$ are diagonalizable, so
$S_k=S_k(\Gamma_1(1))$ has a basis
$$
   f_1,\ldots,f_d
$$
of normalized eigenforms where $d=\dim S_k$.  This basis is canonical
up to ordering.
Let $\T_{\C}=\T\tensor\C$ be the ring generated over $\C$ by 
all Hecke operators $T_n$.
Then, having fixed the basis above, there is a canonical map
\[
  \T_{\C}\hookrightarrow{}\C^d: \quad T\mapsto(\lambda_1,\ldots,\lambda_d),
\]
where $f_i|T=\lambda_{i}f_i$.
This map is injective and $\dim\T_{\C}=d$, so the map is an
isomorphism of $\C$-vector spaces.

The form
\[
  v=f_1+\cdots+f_n
\]
generates $S_k$ as a $\T$-module.  Note that~$v$ is canonical since
it does not depend on the ordering of the~$f_i$.
Since~$v$ corresponds to the vector $(1,\ldots,1)$ and
$\T\isom\C^d$ acts on $S_k\isom\C^d$ componentwise, this
is just the statement that $\C^d$ is generated by
$(1,\ldots,1)$ as a $\C^d$-module.

Recall from Section~\ref{sec:pairing1} 
that there is a perfect bilinear pairing $S_k\times \T_\C \to \C$
given by
\[
 \left\langle f,\, T_n\right\rangle = a_1(f|T_n)=a_n(f),
\]
where $a_n(f)$ denotes the $n$th Fourier coefficient of~$f$.
Thus we have simultaneously:
\begin{enumerate}
\item $S_k$ is free of rank 1 over $\T_\C$, and%
\item $S_k\isom \Hom_{\C}(\T_\C,\C)$ as $\T$-modules.
\end{enumerate}
Combining these two facts yields an isomorphism
\begin{equation}\label{eqn:dualiso}
  \T_\C \isom\Hom_{\C}(\T_\C,\C).
\end{equation}
This isomorphism sends
an element $T \in \T$ to the homomorphism
$$X \mapsto \langle v|T, X \rangle = a_1(v|T|X).$$
Since the identification $S_k\isom \Hom_{\C}(\T_\C,\C)$ is canonical
and since the vector~$v$ is canonical, we see that the isomorphism (\ref{eqn:dualiso})
is canonical.


Recall that $M_k$ has as basis the set of products $E_4^a E_6^b$,
where $4a+6b=k$, and $S_k$ is the subspace of forms where the
constant coefficient of their $q$-expansion is~$0$.  Thus there is
a basis of $S_k$ consisting of forms whose $q$-expansions have
coefficients in~$\Q$.  Let $S_k(\Z) = S_k \cap \Z[[q]]$, be the
submodule of $S_k$ generated by cusp forms with Fourier
coefficients in $\Z$, and note that $S_k(\Z)\tensor\Q \isom
S_k(\Q)$.  Also, the explicit formula $(\sum a_n q^n)|T_p = \sum
a_{np}q^n + p^{k-1} \sum a_n q^{np}$ implies that the Hecke
algebra~$\T$ preserves $S_k(\Z)$.


\begin{proposition}
We have $v\in S_k(\Z)$.
\end{proposition}
\begin{proof}
This is because $v = \sum \Tr(T_n)q^n,$ and, as we observed above,
there is a basis so that the matrices $T_n$ have integer
coefficients, so their traces are integers.
\end{proof}
\begin{example}
When $k=36$, we have
\begin{align*}
   v &= 3q + 139656q^2 - 104875308q^3 + 34841262144q^4 + 892652054010q^5\\
   &\qquad - 4786530564384q^6 + 878422149346056q^7+ \cdots.
\end{align*}
The normalized newforms $f_1$, $f_2$, $f_3$ are
\begin{align*}
 f_i &= q + aq^2 + (-1/72a^2 + 2697a + 478011548)q^3 +(a^2 - 34359738368)q^4\\
 &\qquad (a^2 - 34359738368)q^4 + (-69/2a^2 + 14141780a +
 1225308030462)q^5+ \cdots,
\end{align*}
for $a$ each of the three roots of
$X^3-139656X^2-59208339456X-1467625047588864$.
\end{example}

\subsection{General level}\label{sec:rankone-genlev}
Now we consider the case for general level $N$. Recall that there
are maps
\[
  S_k(\Gamma_1(M))\into S_k(\Gamma_1(N)),
\]
for all~$M$ dividing~$N$ and all divisor~$d$ of $N/M$.

\begin{defn}
The {\em old subspace} of $S_k(\Gamma_1(N))$ is the space
generated by all images of these maps with $M|N$ but $M\neq N$.
The {\em new subspace} is the orthogonal complement of the old
subspace with respect to the Petersson inner product.
\end{defn}

There is an algebraic definition of the new subspace.  One defines
trace maps
\[
  S_k(\Gamma_1(N))\into S_k(\Gamma_1(M))
\]
for all $M<N$, $M\mid N$ which are adjoint to the above maps (with
respect to the Petersson inner product). Then~$f$ is in the new
part of $S_k(\Gamma_1(N))$ if and only if~$f$ is in the kernels of
all of the trace maps.

It follows from Atkin-Lehner-Li theory that the $T_n$ acts
semisimply on the new subspace $S_k(\Gamma_1(M))_{\new}$ for all $M\geq 1$, since
the common eigenspaces for all $T_n$ each have dimension~$1$. Thus
$S_k(\Gamma_1(M))_{\new}$ has a basis of normalized eigenforms. We
have a natural map
\[
\bigoplus_{M\mid N} S_k(\Gamma_1(M))_{\new}\hookrightarrow
               S_k(\Gamma_1(N)).
\]
The image in $S_k(\Gamma_1(N))$ of an eigenform~$f$ for some
$S_k(\Gamma_1(M))_{\new}$ is called a {\em newform} of level
$M_f=M$. Note that a newform of level less than~$N$ is often not an
eigenform for all of the Hecke operators acting on $S_k(\Gamma_1(N))$;
for example, if $N=p^r M$ with $p\nmid M$ a prime, then
$f$ is not eigenform for $T_p$ (see Equation~\ref{eqn:f0up} above).

Let
\[
  v=\sum_{f} f(q^{\frac{N}{M_f}})\in S_k(\Gamma_1(N)),
\]
where the sum is taken over all newforms~$f$ of weight~$k$ and
some level $M\mid{}N$. This generalizes the~$v$ constructed above
when $N=1$ and has many of the same good properties. For example,
$S_k(\Gamma_1(N))$ is free of rank~$1$ over $\T_{\C}$ with basis
element~$v$.   Moreover, the coefficients of~$v$ lie in $\Z$, but
to show this we need to know that $S_k(\Gamma_1(N))$ has a basis
whose $q$-expansions lie in $\Q[[q]]$.   This is true, but we will
not prove it here.  One way to proceed is to use the Tate curve to
construct a
$q$-expansion map $\H^0(X_1(N),\Omega_{X_1(N)/\Q}) \to \Q[[q]]$
that is compatible with the usual Fourier expansion map.

\begin{example}\label{ex:gamma1_22}
The space $S_2(\Gamma_1(22))$ has dimension~$6$.  There is a
single newform of level $11$,
\[
   f = q - 2q^2 - q^3 + 2q^4 + q^5 + 2q^6 - 2q^7 + \cdots.
\]
There are four newforms of level~$22$, the four
$\Gal(\Qbar/\Q)$-conjugates of%
\begin{align*}
 g &=
q - \zeta{}q^2 + (-\zeta{}^3 + \zeta{} - 1)q^3 + \zeta{}^2q^4 +
(2\zeta{}^3 - 2)q^5 \\
 & \qquad+ (\zeta{}^3 - 2\zeta{}^2 + 2\ \zeta{} -
1)q^6 - 2\zeta{}^2q^7 + ...
\end{align*}
where~$\zeta$ is a primitive $10$th root of unity.
\end{example}

\begin{warning}
Let $S = S_2(\Gamma_0(88))$, and let $v = \sum \Tr(T_n)q^n$.  Then
$S$ has dimension $9$, but the Hecke span of~$v$ only has
dimension~$7$.  Thus the more ``canonical looking'' element $\sum
\Tr(T_n)q^n$ is not a generator for~$S$.
\begin{lstlisting}
sage: S = CuspForms(88)
sage: B = S.sturm_bound(); B
25
sage: f = QQ[['q']]([0]+[S.T(n).trace() for n in [1..B]], B+1) 
sage: f
9*q - 2*q^2 - 4*q^3 - 2*q^5 + 2*q^6 - 8*q^7 + ... + O(q^26)
sage: f = S(f)
sage: span([S.T(n)(f).element() for n in [1..B]]).dimension()
7
\end{lstlisting}

%  \edit{I think this because using my MAGMA
% program, I computed the image of v under $T_1$,...,$T_{25}$ and
% the span of the image has dimension 7. For example, there is an
% element of S whose q-expansion has valuation 7, but no element of
% the T-span of v has q-expansion with valuation 7 or 9.}
\end{warning}

\begin{remark}
  Recall Proposition~\ref{prop:totreal1} that the Fourier coefficients
  of each normalized eigenform in $S_k$ are totally real algebraic
  integers.  A {\em CM field} is a quadratic imaginary extension of a
  totally real field.  For example, when $n>2$, the field
  $\Q(\zeta_n)$ is a CM field, with totally real subfield
  $\Q(\zeta_n)^+ = \Q(\zeta_n + 1/\zeta_n)$.  More generally, one
  shows that the eigenvalues of any newform $f\in S_k(\Gamma_1(N))$
  generate a totally real or CM field.
\end{remark}

\section{Decomposing the anemic Hecke algebra}\label{sec:decomp_anemic}
We first observe that it make no difference whether or not we
include the Diamond bracket operators in the Hecke algebra.  Then
we note that the $\Q$-algebra generated by the Hecke operators of
index coprime to the level is isomorphic to a product of fields
corresponding to the Galois conjugacy classes of newforms.
Here the Galois group $G_{\Q} = \Gal(\Qbar/\Q)$
acts on newforms by acting on their coefficients, and a Galois
conjugacy class means an orbit for the action of $G_{\Q}$.

\begin{proposition}
The operators $\dbd{d}$ on $S_k(\Gamma_1(N))$ lie in
$\Z[\ldots,T_n,\ldots]$.
\end{proposition}
\begin{proof}
Dirichlet's theorem on primes in arithmetic progression
(see \cite[VIII.4]{lang:ant}) asserts that every residue
class modulo $N$ coprime to $N$ contains infinitely many
primes. 
Thus it is enough to show $\dbd{p}\in\Z[\ldots,T_n,\ldots]$ for
primes~$p\nmid N$, since each nonzero $\dbd{d}$ is of the form $\dbd{p}$ for
some prime $p$.
Since $p\nmid N$, we have (see Section~\ref{sec:heckeqN}) that
\[
  T_{p^2} = T_p^2 - \dbd{p}p^{k-1},
\]
so $\dbd{p}p^{k-1} = T_p^2 - T_{p^2}$.  
Again, by Dirichlet's theorem
on primes in arithmetic progression, there is another prime~$q$
congruent to~$p$ mod $N$. Since $p^{k-1}$ and $q^{k-1}$ are relatively
prime, there exist integers~$a$ and~$b$ such that $a p^{k-1} + b
q^{k-1} = 1$. Then
\[
\dbd{p}=\dbd{p}(a p^{k-1} + b q^{k-1})
       = a({T_p}^2-T_{p^2}) + b({T_q}^2-T_{q^2})
       \in \Z[\ldots, T_n,\ldots].
\]
\end{proof}


%Let $\Sigma$ be a set of representatives of $\{f_1,\ldots,f_d\}
%\backslash \Gal(\Qbar/\Q)$.  Recall that Maeda's conjecture asserts
%that $\#\Sigma=1$.   Let $K_f =
%\Q(\ldots,a_n(f),\ldots)$ and define a homomorphism of
%$\Q$-algebras
%$$T_{\Q}\into K_f : T_n\mapsto \lambda
%         \text{ where }T_n f = \lambda f$$
%Taking the product over a set of representatives of the $f_i$
%yields a map
%$$\T_{\Q}\xrightarrow{\sim}\prod_{f\in\Sigma}K_f$$
%which is an isomorphism of $\Q$-algebras.

Let~$S$ be a space of cusp forms, such as $S_k(\Gamma_1(N))$ or
$S_k(\Gamma_1(N),\eps)$. Let $$f_1,\ldots, f_d\in S$$ be
representatives for the Galois conjugacy classes of newforms
in~$S$ of level $N_{f_i}$ dividing~$N$.  For each~$i$, let
$K_i=\Q(\ldots, a_n(f_i),\ldots)$ be the field generated by the
Fourier coefficients of $f_i$.
\begin{definition}[Anemic Hecke Algebra]
The {\em anemic Hecke algebra} is the subalgebra
$$\T_0=\Z[\ldots,T_n,\ldots\,:\,\gcd(n,N)=1]\subset\T$$
of~$\T$ obtained by adjoining to~$\Z$ only those
Hecke operators~$T_n$ with~$n$ relatively prime to~$N$.
\end{definition}
\begin{proposition}\label{prop:anemic-tensor-Q}
  We have $\T_0\tensor\Q \isom \prod_{i=1}^d K_i$, where $K_i$ is the
  number field generated by the eigenvalues of $f_i$.
\end{proposition}
The map sends $T_n$ to $(a_n(f_1),\ldots, a_n(f_d))$.  The proposition
follows from the discussion above and Atkin-Lehner theory.
%TODO: give proof?

\begin{example}
When $S=S_2(\Gamma_1(22))$, then $\T_0\tensor\Q\isom
\Q\times \Q(\zeta_{10})$ (see Example~\ref{ex:gamma1_22}).
When $S=S_2(\Gamma_0(37))$, then $\T_0\tensor\Q\isom\Q\cross\Q$.
\end{example}


\begin{remark}
The index $[\T:\T_0]$ is usually not finite.  As explained in
Section~\ref{sec:rankone-genlev}, the space $S_k(\Gamma_1(N))$ is free
of rank $1$ over $\T_{\C}$, so $\dim \T_{\C} = \dim S_k(\Gamma_1(N))$.
Proposition~\ref{prop:anemic-tensor-Q} implies that $\dim (\T_0)_{\C}
= d$ is the number of newforms of level dividing $N$.  If there is at
least one oldform in $S_k(\Gamma_1(N))$, then $d < \dim
S_k(\Gamma_1(N))$, because that oldform has at least two linearly
independent images in $S_k(\Gamma_1(N))$
\end{remark}

\chapter{Some Explicit Genus Computations}\label{chap:genus}

This chapter is about computing the genus of certain modular curves,
or equivalently, the dimensions of certain spaces of cusp forms.  
Section~\ref{sec:genus_gamma} explains the connection between genus
and the dimension of a space of cusp form, and the general picture
regarding ramification of certain covers of modular curves.  Then in
Section~\ref{sec:riemann_gamma}, we explain our strategy to compute
the genus of various modular curves using an Euler characteristic
argument.  In Section~\ref{sec:genusXN} we apply this strategy in the
case of $X(N)$, and Section~\ref{sec:genusX0N} treats the case of
$X_0(N)$ with $N$ prime.   Finally, in Section~\ref{sec:modp} we
discuss a natural isomorphism between two spaces of mod~$p$ modular
forms, which is suggested by dimension considerations. 

We do not treat any other cases explicitly in this book.  For the
general case of $X_0(N)$, the reader might look at
\cite[\S1.6]{shimura:intro}, for $X_1(N)$ at
\cite[\S9.1]{diamond-im}, and at 
\cite[Ch.~3]{diamond-shurman}.
See also Section~\ref{sec:genusxN} for a
different approach in to computing the genus of $X(N)$.

\section{Computing the dimension of $S_2(\Gamma)$}\label{sec:genus_gamma}
Let $k=2$ unless otherwise noted, and let
$\Gamma\subset\sltwoz$ be a congruence subgroup. 
Then $S_2(\Gamma)\isom H^{0}(X_{\Gamma},\Omega^1)$
where $X_{\Gamma}=(\Gamma\backslash\cH)\union
                (\Gamma\backslash\bP^1(\Q)).$
By definition $\dim H^{0}(X_{\Gamma},\Omega^1)$ 
is the genus of $X_{\Gamma}$.

Since $\Gamma\subset\Gamma(1)$ there is a covering 
$X_{\Gamma}\to X_{\Gamma(1)} \xrightarrow{j} \P^1(\C)$, 
which can only possibly be ramified at points above $0, 1728, \infty \in \P^1(\C)$.
Here $0$ corresponds to $\rho=e^{2\pi i/3}$ and $1728$ corresponds to $i$ 
under the $j$-invariant map.  We illustrate this as follows:
$$\xymatrix{
{\Gamma\backslash\cH} \ar[r]\ar[d]& {X_{\Gamma}}\ar[d] \\
{\Gamma(1)\backslash\cH} \ar[r] & {X_{\Gamma(1)}}\ar[d]^{j}\\
                               & {\bP^1(\C)}}
$$


\begin{example} Suppose $\Gamma=\Gamma_0(N)$. The degree of the
  covering is the index $(\sltwoz/\{\pm 1\}:\Gamma_0(N)/\{\pm 1\})$.
  As explained in Theorem~\ref{thm:paramcurves}, a point on
  $Y_{\Gamma(1)}$ corresponds to an isomorphism class of elliptic
  curves over $\C$, whereas a points on $Y_{0}(N)$ correspond to an
  isomorphism class of a pair consisting of an elliptic curve and a
  cyclic subgroup of order $N$.  The map $Y_0(N)\to
  Y_{\Gamma(1)}=Y_0(1)$ forgets the extra structure of the cyclic
  subgroup.
\end{example}

\section{Application of Riemann-Hurwitz}\label{sec:riemann_gamma}
Now we compute the genus of $X_{\Gamma}$ by applying the
Riemann-Hurwitz formula.
We recall some standard facts
about the Euler characteristic of a topological space, and
also the Riemann-Hurwitz formula. 

The Euler characteristic $\chi$ is additive in
the sense that if $A$ and $B$ are disjoint spaces then
$$\chi(A\union B)=\chi(A)+\chi(B).$$ 
Also, if $X$ is a compact Riemann surface of genus $g$, then
$\chi(X)=2-2g$, and $\chi(\{\text{point}\})=1$.
Thus
$$\chi(X-\{p_1,\ldots,p_n\})=\chi(X)-n\chi(\{\text{point}\})=(2-2g)-n.$$

If $X\into Y$ is an unramified covering 
of degree $d$ then a special case of 
the Riemann-Hurwitz formula is the assertion that
\begin{equation}
\chi(X)=d\cdot\chi(Y).
\end{equation}
Identifying $X_{\Gamma(1)}$ and $\P^1(\C)$ using the $j$ map, 
consider the covering 
$$\xymatrix{
  {X_{\Gamma}-\{\text{points over $0,1728,\infty$}\}}
     \ar[d]\\ 
  X_{\Gamma(1)}-\{0,1728,\infty\}.
}$$
This covering is unramified, as was explained in Proposition~\ref{prop:ramified}.

Since $X_{\Gamma(1)}$ has genus $0$, the space $X_{\Gamma(1)}-\{0,1728,\infty\}$ 
has Euler characteristic $2-3=-1$. If we let $g=\chi(X_{\Gamma})$ then
$$\chi(X_{\Gamma}-\{\text{points over $0,1728,\infty$}\})
             = 2-2g -n_{0} - n_{1728} - n_{\infty},$$
where $n_p$ denotes the number of points lying over $p$.
Thus $-d=2-2g-n_0-n_{1728}-n_{\infty}$ whence
$$2g-2 = d - n_0 -n_{1728}-n_{\infty}.$$

\noindent{\em\bf Conclusion:} Finding the genus of {\em any} modular curve $X_{\Gamma}$ 
amounts to calculating:
\begin{enumerate}\setlength{\itemsep}{-.5ex}
\item the degree $d$ of the $j$ function,
\item the
number $n_0 + n_{1728}$ of points on $X_{\Gamma}$ with $j$-invariant $0$ or $1728$ 
and, 
\item the number $n_{\infty}$ of cusps for $\Gamma$.   
\end{enumerate}


% For example, suppose $\Gamma=\Gamma(N)$ with $N>3$.  Then $n_0=d/3$ and $n_{1728}=d/2$.
% The degree $d$ of the covering is equal to the number of unordered
% ordered basis of $E[N]$, thus 
% $$d=\frac{1}{2}\cdot \#\SL_2(\Z/N\Z).$$
% We still need to compute $n_{\infty}$.  The group $\sltwoz$ acts on
% $\bP^1(\Q)$; explicitly, if we view $\bP^1(\Q)$ as all pairs $(a,b)$
% of relatively prime integers and suppose $\infty$ corresponds to
% $(1,0)$, then the action is by left matrix multiplication on $(a,b)$
% viewed as a column vector. The stabilizer of $(1,0)$ is the sugroup
% $\{\abcd \in \sltwoz : c=0 \}$ of upper triangular matrices.  Since
% the points lying over $\infty$ are all conjugate by the Galois group
% of the covering (which is $\SL_2(\Z/N\Z)/\{\pm 1\}$),
% $$\text{number of cusps}=\frac{\text{order of $\SL_2(\Z/N\Z)/\{\pm 1\}$}}
%                               {\text{order of stabilizer of $\infty$}}.$$
% We thus have
% $$2g(X(N))-2=\frac{d}{6}-\frac{d}{N}$$
% where $\frac{d}{N}$ is the number of cusps. 

%% 2/12/96
\section{The Genus of $X(N)$}\label{sec:genusXN}
Let $N>3$ and consider the modular curve $X=X(N)$. 
There is a natural covering map $X\into{}X(1)\xrightarrow{j}\C$. 
Let $d$ be the degree, then as we saw above
$$2g-2=d-n_0-n_{1728}-n_{\infty}$$
where $g$ is the genus of $X$ and
$n_p$ is the number of points lying over $p$.  
Since $n_0=d/3$ and $n_{1728}=d/2$,
$$
  2g-2=\frac{d}{6} - n_{\infty}.
$$  

Now we count the number $n_{\infty}$ of cusps of $X(N)$, that is, the
size of $\Gamma(N)\backslash\bP^1(\Q)$. There is a surjective map
from $\sltwoz$ to $\bP^1(\Q)$ given by 
$$\bigabcd\mapsto \bigabcd\left(\begin{matrix}1\\0\end{matrix}\right).$$
The subgroup of elements of $\sltwoz$ that stabilize $(1,0)$
is 
$$U=\left\{\pm\left(\begin{matrix}1&a\\0&1\end{matrix}\right):a\in\Z\right\}.
$$
The cusps of $X(N)$ are the elements of
$$\Gamma(N)\backslash(\sltwoz/U)=(\Gamma(N)\backslash\sltwoz)/U=\SL_2(\Z/N\Z)/U$$
which has order $$\frac{\#\SL_2(\Z/N\Z)}{2N}=\frac{d}{N}.$$ 

Substituting this into the above formula gives
$$2g-2=\frac{d}{6}-\frac{d}{N}=\frac{d}{6N}(N-6),$$
so $$g=1+\frac{d}{12N}(N-6).$$
When $N$ is prime, 
$$d=\frac{1}{2}\cdot \#\SL_2(\Z/N\Z)=\frac{1}{2}\cdot\frac{(N^2-1)(N^2-N)}{N-1}.$$
Thus when $N=5$, $d=60$ so $g=0$, and when $N=7$, $d=168$ so $g=3$.
When $N=2011$, we have $g=337852526$.

\section{The Genus of $X_0(N)$, for $N$ prime}\label{sec:genusX0N}
Suppose $N>3$ and $N$ is prime. The covering map $X_0(N)\into X(1)$ is
of degree $N+1$ since a point of $X_0(N)$ corresponds to an elliptic
curve along with a subgroup of order $N$ and there are $N+1$ such
subgroups because $N$ is prime.  Since $N$ is prime, $X_0(N)$ has two
cusps; they are the orbit of $\infty$ which is unramified and $0$
which is ramified of order $N$.  Thus
$$2g-2=N+1-2-n_{1728}-n_0.$$
Here $n_0$ is the number of pairs $(E,C)$ (modulo isomorphism) such that $E$
has $j$-invariant $0$. So we consider $E=\C/\Z[\frac{-1+i\sqrt{3}}{2}]$ which 
has endomorphism ring $\End(E)=\Z[\Mu_6]$. 
Now $\Mu_6/{\pm 1}$ acts on the cyclic subgroups
$C$ so, letting $\omega$ be a primitive cube root of unity, we have
$$(E,C)\isom(E,\omega C)\isom(E,\omega^2 C).$$   
This might lead one to think that $n_0$ is $(N+1)/3$, but it may
be bigger if, for example, $C=\omega{}C$.
Thus we must count those $C$ so that $\omega C=C$ or $\omega^2 C=C$, that is,
those $C$ which are stable under $\cO=\Z[\frac{-1+i\sqrt{3}}{2}]$.
So we must compute the number of stable $\cO/N\cO$-submodules of order $N$.
This depends on the structure of $\cO/N\cO$:
$$\cO/N\cO = \begin{cases}
          \F_N\oplus\F_N&\text{if $(\frac{-3}{N})=1$ ($N$ splits)}\\
          \F_{N^2} &\text{if $(\frac{-3}{N})=-1$ ($N$ stays inert)}
\end{cases}
$$
Since $\cO/N\cO=\F_{N^2}$ is a field it has no submodules of order $N$,
whereas $\F_{N}\oplus\F_{N}$ has two $\cO/N\cO$-submodules of 
order $N$, namely $\F_N\oplus{}0$ and $0\oplus\F_N$.
Thus 
$$n_0 = \begin{cases}
\frac{N+1}{3} & \text{if $N\equiv 2\pmod{3}$}\\
\frac{N-1}{3}+2 & \text{if $N\equiv 1\pmod{3}$}
\end{cases}
$$
\begin{exercise} It is an exercise in elegance to write this
as a single formula involving the quadratic symbol. 
\end{exercise}

By similar reasoning one shows that
$$n_{1728}=\begin{cases}
\frac{N+1}{2} & \text{if $N\equiv 3\pmod{4}$}\\
\frac{N-1}{2}+2 & \text{if $N\equiv 1\pmod{4}$}
\end{cases}
$$
We can now compute the genus of $X_0(N)$ for any prime $N$. 
For example, if $N=37$ then 
$2g-2=36-(2+18)-(14)=2$ so $g=2$. Similarly, $X_0(13)$ has genus $0$ and
$X_0(11)$ has genus $1$. In general, $X_0(N)$ has genus approximately
$N/12$.

Serre\index{Serre} constructed a nice formula for the above genus. Suppose $N>3$ is a
prime and write $N=12a+b$ with $0\leq b\leq 11$. Then Serre's formula is
\begin{center}
\begin{tabular}{|c|cccc|}\hline
$b$&1&5&7&11\\\hline
$g$&$a-1$&$a$&$a$&$a+1$\\\hline
\end{tabular} 
\end{center}

\section{Modular forms mod $p$}\label{sec:modp}
Let $N$ be a positive integer, let $p$ be a prime and 
assume $\Gamma$ is either $\Gamma_0(N)$ or $\Gamma_1(N)$.

\begin{defn}
Let $M_k(\Gamma,\Z)=M_k(\Gamma,\C)\intersect\Z[[q]]$. Then
$$M_k(\Gamma,\F_p)=M_k(\Gamma,\Z)\tensor_{\Z}\F_p$$ is
the space of {\em modular forms mod $p$} of weight $k$. 
\end{defn}

Suppose $p=N$.  Then one has {\em Serre's Equality}:\index{Serre}
$$M_{p+1}(\sltwoz,\F_p)=M_2(\Gamma_0(p),\F_p)$$

\todo{Insert a dimension formula calculation to give evidence
for this equality, since that's the whole reason this section
is in this chapter.}

The map from the right hand side to the left hand side is
accomplished via a certain normalized Eisenstein series\index{Eisenstein series}.
Recall from Section~\ref{sec:sl2eis} that for $\sltwoz$ we have
Eisenstein series
$$G_k=-\frac{B_k}{2k}+\sum_{n=1}^{\infty}\left(\sum_{d|n}d^{k-1}\right)q^n$$
and 
$$E_k=1-\frac{2k}{B_k}\sum_{n=1}^{\infty}(\sum_{d|n}d^{k-1})q^n.$$
One finds $\ord_p(-\frac{B_k}{2k})$ using Kummer congruences \todo{elaborate}.
In particular, $\ord_p(B_{p-1})=-1,$ 
so $E_{p-1}\equiv 1\pmod{p}$. Thus multiplication by $E_{p-1}$ 
increases the weight by $p-1$ but does not change the $q$-expansion mod $p$.
We thus get a map 
$$M_2(\Gamma_0(p),\F_p)\into M_{p+1}(\Gamma_0(p),\F_p).$$
The map 
$$M_{p+1}(\Gamma_0(p),\F_p)\into{}M_{p+1}(\sltwoz,\F_p)$$
is the trace map (which is dual to the natural inclusion going
the other way) and is accomplished by averaging in order to get
a form invariant under $\sltwoz$.


\chapter{The Field of Moduli}
In this chapter we will study the field of definition of the modular
curves\index{modular curves} $X(N)$, $X_0(N)$, and $X_1(N)$.  We will
use the correspondence between function fields and nonsingular
projective algebraic curves, as explained in
\cite[\S{}I.6]{hartshorne}.
For example, the function field of $X(1)=\bP^1_{\Q}$ is $\Q(t)$. 

\section{The Modular curve $X(N)$ and $N$-torsion points}
If $E$ is an elliptic curve given by a Weierstrass equation
$y^2=4x^3-g_2x-g_3$
then $$j(E)=j(g_2,g_3)=\frac{1728g_2^3}{g_2^3-27g_3^2}.$$ 
% TODO: exercise
% see this by writing curve as 
% (y/2)^2=x^3-(g_2/4)x-g_3/4 and using Sage:
%sage: var('g2,g3')
%(g2, g3)
%sage: E = EllipticCurve([-g2/4,-g3/4])
%sage: E.j_invariant()
%1728*g2^3/(g2^3 - 27*g3^2)
The $j$-invariant determines the isomorphism class of $E$ over $\C$,
since $j:X(1)\to\P^1_{\C}$ has degree 1 (see
\cite[VII.3.3]{serre:arithmetic}).  There is an elliptic curve
$E/\Q(t)$ such that $j(E)=t$, for example, the elliptic
curve with Weierstrass equation
\begin{equation}\label{eqn:Ejt}
y^2=4x^3-\frac{27t}{t-1728}x-\frac{27t}{t-1728}.
\end{equation}

For the moment, let $k$ be any field, $E/k$ an arbitrary elliptic
curve and $N$ a positive integer prime to $\Char{} k$. Upon
fixing a choice of basis for $E[N]$, we have
$E[N](\overline{k})\isom(\Z/N\Z)^2$.  Let $k(E[N])$ be the field
obtained by adjoining the coordinates of the $N$-torsion points of
$E$ to $k$, so we have a tower of fields 
$\overline{k}\supset k(E[N])\supset k$. 
There is a Galois representation on the $N$ torsion of $E$:
$$
  \Gal(\overline{k}/k)\xrightarrow{\rho_{E,N}}\Aut(E[N])\isom\GL_2(\Z/N\Z)
$$
and
$\Gal(\overline{k}/k(E[N]))=\ker(\rho_{E,N})$.
Also $\Gal(k(E[N])/k) \hra \GL_2(\Z/N\Z)$.

Applying the above observations with $k=\Q(t)$ and $E$ the curve from
\eqref{eqn:Ejt} with $j$-invariant $t$, shows that the Galois group of
the extension $\Q(t)(E[N])$ of $\Q(t)$ is contained in
$\GL_2(\Z/N\Z)$. Let $X(N)$ be the algebraic curve corresponding to
the function field $\Q(t)(E[N])$ over $\Q$. Since
$\overline{\Q}\intersect(\Q(t)(E[N]))$ is contained in $\Q(\Mu_N)$,
the curve $X(N)$ is defined over $\Q(\Mu_N)$.
The main goal of this chapter is to show that the affine points of $X(N)(\C)$ 
correspond to isomorphism classes of triples $(E,P,Q)$
with $e_N(P,Q)=-1\in\Z/N\Z$, 
just as we had for the the Riemann surface
that we called $X(N)$ in Chapter~\ref{ch:modcurves}.
This will follow once we know that the representation $\rho_{E,N}$
is surjective.  

Our strategy to prove this surjectivity starts
by composing $\rho_{E,N}$ with the natural map
$\GL_2(\Z/N\Z)\into\GL_2(\Z/N\Z)/\{\pm 1\}$ to define a map
$$
  \overline{\rho}_{E,N}:\Gal(\overline{k}/k)\into\GL_2(\Z/N\Z)/\{\pm 1\}.
$$
The representation $\overline{\rho}_{E,N}$ will turn out to be very
relevant, since it is much easier to understand how
$\Gal(\overline{k}/k)$ acts on $x$-coordinates of $N$-torsion points in
short Weierstrass form, which do not change under multiplication by $-1$.
Moreover, in the common case $\Aut(E)=\{\pm 1\}$, considering
$\overline{\rho}_{E,N}$ instead of $\rho_{E,N}$ will be advantageous
(see Proposition~\ref{prop:surjiso}).

\begin{proposition}\label{PropModSurj}
$\overline{\rho}_E$ is surjective if and only if $\rho_E$ is surjective.
\end{proposition}
\begin{proof}
If $\overline{\rho}_E$ is surjective then either 
$\mtwosmall{0}{-1}{1}{\hfill 0}$
or its negative lies in the image of $\rho$. Thus 
$\mtwosmall{-1}{\hfill 0}{\hfill 0}{-1}$
lies in the image of $\rho$. Since $\overline{\rho}_E$ is surjective
this implies that $\rho$ is surjective. The converse is trivial.
\end{proof}

\section{Digression on moduli}
Recall from Theorem~\ref{thm:paramcurves} that $X_0(N)(\C)$ is the set
of $\C$-isomorphism classes of pairs $(E,C)$ where $E/\C$ is an
elliptic curve and $C$ is a cyclic subgroup of order $N$.  Assume for
the moment the fact that $X_0(N)$ has a (canonical) model of algebraic
curve over $\Q$; given the above theorem, it is reasonable to assume
that $X_0(N)(\Qbar)$ is the set of $\Qbar$-isomorphism classes of
pairs $(E,C)$ where $E/\Qbar$ is an elliptic curve and $C$ is a cyclic
subgroup of order $N$.  Each $\sigma \in \Gal(\Qbar/\Q)$ acts on
$X_0(N)(\Qbar)$ by sending the class of $(E,C)$ to the class of
$(\presup{\sigma}E, \presup{\sigma}C)$, where $\presup{\sigma}E$ is the elliptic curve
got by applying $\sigma$ to the coefficients of an equation for $E$,
and $\presup{\sigma}C \subset \presup{\sigma}E(\Qbar)[N]$ is the image
of $C$ under $\sigma$.

For any number field $K$, by Galois
theory (since $\Qbar/K$ is separable) we have $X_0(N)(K) =
X_0(N)(\Qbar)^{\Gal(\Qbar/K)}$.  Thus $X_0(N)(K)$ is the set of
isomorphism classes of pairs $(E,C) \in X_0(N)(\Qbar)$ such that for
all $\sigma\in\Gal(\Qbar/K)$, there exists some isomorphism
$(\presup{\sigma}E, \presup{\sigma}C)\ncisom (E,C)$ defined over $\Qbar$.  There is a
map
$$\{\text{$K$-isomorphism classes of pairs $(E,C)/K$}\}\into{}X_0(N)(K)$$
that is ``notoriously'' non-injective.  For example, when $N=1$, the
map $X_0(1) \xrightarrow{j} \P^1$ identifies $X_0(1)$ with the
$j$-line.  With this identification, the above map then sends an
elliptic curve $E/K$ to its $j$-invariant; since all quadratic twists
of $E$ are also defined over $K$ and have the same $j$-invariant, they
define infinitely many different elements of the left hand side that
all map to the same point $j(E)$ in the right hand side. 

The paper \cite{deligne-rapoport} contains a proof that the map is
surjective, i.e., that any isomorphism class $[(E,C)]$, with $E$ and
$C$ defined over $\Qbar$ that is fixed by all $\sigma\in
\Gal(\Qbar/K)$ has a representative element $(E,C)$ with $E$ and $C$
defined over $K$.  When $N=1$ \cite{deligne-rapoport} observe that the
map is surjective directly, i.e., they answer this question:
\begin{question}
If $E/\overline{K}$ is isomorphic to all its Galois conjugates, is there
a curve $E'/K$ that is isomorphic to $E$ over $\overline{K}$? 
\end{question}
For $N>1$ they show that certain obstructions vanish. \todo{precise ref?}

\section{When is $\rho_E$ surjective?}\label{sec:rhoEC}
Let $K$ be a field of characteristic $0$. 

\begin{proposition}\label{prop:surjiso}
  Let $E_1$ and $E_2$ be elliptic curves defined over $K$ with equal
  $j$-invariants, so $E_1\ncisom E_2$ over $\overline{K}$.  Assume
  $E_1$ and $E_2$ do not have complex multiplication over
  $\overline{K}$.  Then $\rho_{E_1}$ is surjective if and only if
  $\rho_{E_2}$ is surjective.
\end{proposition}
\begin{proof}
Assume $\rho_{E_1}$ is surjective. Since $E_1$ does not have
 complex multiplication
over $\overline{K}$, we have $\Aut E_1=\{\pm 1\}$. Choose an isomorphism 
$\varphi:E_1\xrightarrow{\sim}E_2$ over $\overline{K}$.
Then for any $\sigma\in\Gal(\overline{K}/K)$ we have the diagram
$$\xymatrix{
     E_1 \ar[r]^{\varphi} \ar[d]_{=} & E_2\ar[d]_{=} \\
   \presup{\sigma}E_1 \ar[r]^{\sigma\varphi} & \presup{\sigma}E_2},$$
where we note that $\presup{\sigma}E_1 = E_1$ and 
$\presup{\sigma}E_1 = E_2$, since both curves are defined over $K$.
Thus $\sigma\varphi=\pm\varphi$ for all $\sigma\in\Gal(\overline{K}/K)$,
so $\varphi:E_1[N]\into{}E_2[N]$ defines an equivalence
$\overline{\rho}_{E_1}\isom\overline{\rho}_{E_2}$. 
Since $\rho_{E_1}$ is surjective this implies $\overline{\rho}_{E_2}$
is surjective which, by the previous proposition, implies $\rho_{E_2}$ 
is surjective.
\end{proof}

Let $K=\C(j)$, with $j$ transcendental over $\C$. Let $E/K$ be an
elliptic curve such as \eqref{eqn:Ejt} with $j$-invariant $j$. Fix a
positive integer $N$ and let
$$\rho_E:\Gal(\overline{K}/K)\into\GL_2(\Z/N\Z)$$ be the
associated Galois representation on the $N$-torsion of $E$.  Then
$\det\rho_E$ is the cyclotomic character, which is trivial since $\C
\subset K$ and $\C$ contains the $N$th roots of unity.  Thus the image
of $\rho_E$ lands inside of $\SL_2(\Z/N\Z)$. Our next theorem states
that a ``generic elliptic curve'', i.e., a curve with $j$-invariant
$j$, has maximal possible Galois action on its division points.
\begin{theorem}
$\rho_E:\Gal(\overline{K}/K)\into\SL_2(\Z/N\Z)$ is surjective. 
\end{theorem}
Igusa \cite{igusa:fibre} \todo{I could not find anything about this
in \cite{igusa:fibre}, but I only looked for a few minutes.} 
found an algebraic proof of this theorem,
but we content ourselves with 
making some comments on how an analytic proof goes.
\begin{proof}
  The field $\C(j)=K=\cF_1$ is the field of modular functions for
  $\sltwoz$. Suppose $N\geq 3$ and let $\cF_N$ be the field of
  mereomorphic functions for $\Gamma(N)$, i.e., meromorphic functions
  on $\h^*$ that are invariant under $\Gamma(N)$.  One can show that
  $\cF_N/\cF_1$ is a Galois extension with Galois group
  $\SL_2(\Z/N\Z)/\{\pm 1\} \isom
  \overline{\Gamma(1)}/\overline{\Gamma(N)}$, where
  $\overline{\Gamma(N)}$ denotes the imagine of $\Gamma(N)$ in
  $\PSL_2(\Z)$.

Let $E$ be an elliptic curve over $K$ with $j$-invariant $j$.
We show that $\Gal(\cF_N/\cF_1) \isom \SL_2(\Z/N\Z)/\{\pm 1\}$
acts transitively on the $x$-coordinates of the 
$N$-torsion points of $E$. This will show that $\overline{\rho}_E$
maps surjectively onto $\SL_2(\Z/N\Z)/\{\pm 1\}$ \todo{Why?}. Then by 
Proposition \ref{PropModSurj}, $\rho_E$ maps surjectively 
onto $\SL_2(\Z/N\Z)$, as claimed.

We will now construct the $x$-coordinates of $E[N]$ as
functions on $\cH$ that are invariant under $\Gamma(N)$. 
(Thus $K(E[N]/\{\pm 1\})\subset \cF_N$.) 

Let $\tau\in\cH$ and let $\Lambda_{\tau}=\Z\tau+\Z$. Consider 
$\wp(z,\Lambda_{\tau})$, which gives the $x$-coordinate of
$\C/\Lambda_{\tau}$ in its standard form
$y^2=4x^3-g_2x-g_3$. Define, for
each nonzero $(r,s)\in((\Z/N\Z)/\{\pm{}1\})^2$, a function 
$$f_{(r,s)}:\cH\into\C: \quad \tau\mapsto\frac{g_2(\tau)}{g_3(\tau)}
          \wp\left(\frac{r\tau+s}{N},\Lambda_{\tau}\right).$$
First notice that for any $\alpha=\abcd\in\sltwoz$, 
$$f_{(r,s)}(\alpha\tau)=f_{(r,s)\abcd}(\tau).$$
Indeed, $\wp$ is homogeneous of degree $-2$, $g_2$ is modular
of weight 4 and $g_3$ is modular of weight 6, so
\begin{align*}
f_{(r,s)}(\alpha\tau)& =\frac{g_2(\alpha\tau)}{g_3(\alpha\tau)}
                      \wp\left(\frac{r\alpha\tau+s}{N}\right)\\
& = (c\tau+d)^{-2}\frac{g_2(\tau)}{g_3(\tau)}
                      \wp\left(\frac{ra\tau+rb+cs\tau+sd}{N(c\tau+d)}\right)\\
& = \frac{g_2(\tau)}{g_3(\tau)}\wp\left(\frac{(ra+sc)\tau+rb+sd}{N}\right)
  = f_{(r,s)\alpha}(\tau)
\end{align*}

In this paragraph, let $E_{j(\tau)}$ denote an elliptic curve over
$\C$ with $j$-invariant $j(\tau)$.  If $\tau\in\cH$ with $g_2(\tau),
g_3(\tau)\neq 0$ then the $f_{(r,s)}(\tau)$ are the $x$-coordinates of
the nonzero $N$-division points of $E_{j(\tau)}$. The various
$f_{(r,s)}(\tau)$ are distinct. Thus $\SL_2(\Z/N\Z)/\{\pm 1\}$ acts
transitively on the $f_{(r,s)}$. The consequence is that the $N^2-1$
nonzero division points of our generic curve $E$ have $x$-coordinates
in $\overline{\cF}_N$ equal to the $f_{(r,s)}\in\cF_N$.
\end{proof} 

%%%%%%%%%%%%%%%%%%%%%
%% Trivial Observation: I just don't understand this proof!
%%%%%%%%%%%%%%%%%%%%%

\section{Observations}
\begin{proposition} If $E/\Q(\Mu_N)(t)$ is an elliptic curve with
$j(E)=t$, then $\rho_E$ has image $\SL_2(\Z/N\Z)$.
\end{proposition}
\begin{proof}
  Since $\Q(\Mu_N)$ contains the $N$th roots of unity, the $N$th
  cyclotomic character is trivial, hence the determinant of $\rho_E$
  is trivial.  Thus the image of $\rho_E$ lies in $\SL_2(\Z/N\Z)$.  In
  the other direction, there is a natural inclusion
$$\SL_2(\Z/N\Z)=\Gal(\C(t)(E[N])/\C(t))\hookrightarrow 
  \Gal(\Q(\Mu_N)(t)(E[N])/\Q(\Mu_N)(t)).$$
\end{proof}  

\begin{proposition}
If $E/\Q(t)$ is an elliptic curve with $j(E)=t$, then
$\rho_E$ has image $\GL_2(\Z/N\Z)$ and 
$\overline{\Q}\intersect\Q(t)(E[N])=\Q(\Mu_N).$
\end{proposition}
\begin{proof}
  Since $\Q(t)$ contains no $N$th roots of unity (recall $N\geq 3$),
  the mod $N$ cyclotomic character, and hence $\det\rho_E$, is
  surjective onto $(\Z/N\Z)^{*}$. Since the image of $\rho_E$ already
  contains $\SL_2(\Z/N\Z)$ it must equal $\GL_2(\Z/N\Z)$.  For the
  second assertion consider the diagram
$$\xymatrix{
  {\Qbar}\ar@{-}[d]  & {\Q(t)(E[N])} \ar@{-}[d]^{\SL_2}\\
  {\Q(\Mu_N)} \ar@{-}[r]\ar@{-}[d]_{(\Z/N\Z)^{*}} 
          & {\Q(\Mu_N)(t)}\ar@{-}[d]^{\GL_2/\SL_2=(\Z/N\Z)^{*}}\\
  {\Q} \ar@{-}[r] & {\Q(t)}}$$  
\end{proof} 

This gives a way to view $X_0(N)$ as a projective algebraic
curve over $\Q$. Let $K=\Q(t)$ and let $L=K(E[N])\supset\Q(\Mu_N)(t)$. 
Then $$H=\{\bigl(\begin{smallmatrix}*&*\\0&*\end{smallmatrix}\bigr)\}
        \subset\GL_2(\Z/N\Z)=\Gal(L/K).$$
The fixed field $L^H$ is an extension of $\Q(t)$ of transcendence
degree 1 with field of constants $\Qbar\intersect L^H=\Q$, 
i.e., a projective algebraic curve defined over $\Q$. 

%2/16/96
\section{A descent problem}\index{descent}
Consider the following exercise, which may be approached in
an honest or dishonest way.
\begin{exercise}
Suppose $L/K$ is a finite Galois extension and $G=\Gal(L/K)$.
Let $E/L$ be an elliptic curve, assume $\Aut_L{E}=\{\pm 1\}$,
and suppose that for all $g\in{}G$, there is an 
isomorphism $\presup{g}E\iso{}E$ over $L$. Show that
there exists $E_0/K$ such that $E_0\isom{}E$ over $L$.
\end{exercise}
{\bfseries Caution!} The exercise is {\em false} as stated.
Both the dishonest and honest approaches below work only if
$L$ is a separable closure of $K$. Now: can one construct
a counterexample?

{\em Discussion.}
First the hard, but ``honest'' way to look at this problem. 
For notions on descent\index{descent} see 
\cite[V.20]{serre:alggroups}.  
By descent theory, to give $E_0$ is the same as to
give a family $(\lambda_g)_{g\in{}G}$ of maps
$\lambda_{g}:\presup{g}E\iso{}E$ such that
$\lambda_{gh}=\lambda_{g}\circ\presup{g}\lambda_h$
where $\presup{g}\lambda_h=g\circ\lambda_h\circ{}g^{-1}$.
Note that $\lambda_{g}\circ\presup{g}\lambda_h$ 
maps $\presup{gh}E\into E$.
This is the natural condition to impose, because if
$f:E_0\iso E$ and we let $\lambda_g=f\circ\presup{g}(f^{-1})$
then $\lambda_{gh}=\lambda_{g}\circ\presup{g}\lambda_h$. 

Using our hypothesis choose, for each $g\in G$, an isomorphism 
$$\lambda_{g}:\presup{g}E\iso{}E.$$ Define a map $c$
by $$c(g,h)=\lambda_g\circ\presup{g}\lambda_h\circ\lambda_{gh}^{-1}.$$
Note that $c(g,h)\in\Aut E=\{\pm 1\}$ so $c$ defines an
element of 
$$H^2(G,\{\pm 1\})\subset H^2(\Gal(\overline{L}/K),\{\pm 1\})
=\Br(K)[2].$$
Here $\Br(K)[2]$ denotes the 2-torsion of the Brauer group 
$$\Br(K)=H^2(\Gal(\overline{L}/K),\overline{L}^{*}).$$
This probably leads to an honest proof. 

The dishonest approach is to note that $g(j(E))=j(E)$ for all
$g\in{}G$, since all conjugates of $E$ are isomorphic
and $j(\presup{g}E)=g(j(E))$. Thus $j(E)\in K$ (assuming $K$
is perfect), so we
can define $E_0/K$ by substituting $j(E)$ into \eqref{eqn:Ejt}. This
gives an elliptic curve $E_0$ defined over $K$ but isomorphic
to $E$ over $\overline{K}$.

%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 2/21/96
%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Second look at the descent exercise}
\index{descent}
We have been discussing the following problem. Suppose $L/K$
is a Galois extension with $\Char K=0$, and let $E/L$ be 
an elliptic curve. Suppose that for all $\sigma\in{}G=\Gal(L/K)$,
$\presup{\sigma}E\isom E$ over $L$. Conclude that there is 
an elliptic curve $E_0/K$ such that $E_0\isom E$ over $L$. 
The conclusion may fail to hold if $L$ is a finite extension
of $K$, but the exercise is true when $L=\overline{K}$. First we
give a descent argument which holds when $L=\overline{K}$ and
then give a counterexample to the more general statement.

For $g,h\in{}G=\Gal(L/K)$ we define an automorphism 
$c(g,h)\in\Aut E=\{\pm 1\}$. Choose for every $g\in\Gal(L/K)$ some
isomorphism $$\lambda_g:\presup{g}E\iso E.$$
If the $\lambda_g$ were to all satisfy the compatibility criterion
$\lambda_{gh}=\lambda_g\circ\presup{g}\lambda_h$ then by
descent theory we could find a $K$-structure on $E$, that
is a model for $E$ defined over $K$ and isomorphic to $E$ over $L$.
Define $c(g,h)$ by $c(g,h)\lambda_{gh}=\lambda_{g}\circ\presup{g}\lambda_h$
so $c(g,h)$ measures how much the $\lambda_g$ fail to satisfy
the compatibility criterion. Since $c(g,h)$ is a cocycle it defines 
an elements of $H^2(G,\{\pm 1\})$. We want to know that this element
is trivial. 
When $L=\overline{K}$, the map
$H^2(G,\{\pm 1\})\into H^2(G,L^{*})$ is injective.  To see this first
consider the exact sequence
$$0\into\{\pm 1\}\into\overline{K}^{*}\xrightarrow{2}\overline{K}^{*}\into 0$$
where $2:\overline{K}^{*}\into\overline{K}^{*}$ is the squaring map. 
Taking cohomology yields an exact sequence
$$H^1(G,\overline{K}^{*})\into{}H^2(G,\{\pm 1\})
           \into{}H^2(G,\overline{K}^{*}).$$
By Hilbert's theorem 90 (\cite{serre:localfields} Ch. X, Prop. 2), 
$H^1(G,\{\pm 1\})=0$. Thus we have an exact sequence
$$0\into H^2(G,\{\pm 1\})\into H^2(G,\overline{K}^{*})[2]\into 0.$$ 
Thus $H^2(G,\{\pm 1\})$ naturally sits inside $H^2(G,L^*)$.

\todo{To finish Ribet does something with differentials and 
$H^0(\presup{g}E,\Omega^1)$ which I don't understand.}

The counterexample in the case when $L/K$ is finite was
provided by Kevin Buzzard\index{Buzzard} \todo{(who said Coates gave it
to him)}. Let $L=\Q(i)$, $K=\Q$ and $E$ be the elliptic curve
with Weirstrass equation $iy^2=x^3+x+1$. Then $E$ is
isomorphic to its conjugate over $L$ but one can show directly
that $E$ has no model over $\Q$.  \todo{BUT: Isn't $y^2=x^3+x+1$
a model for this curve over $\Q$.  It is isomorphic to that
curve over $\Qbar$.}

%%%%%%%%%%%%%%%%%%%%%%%
%% Big mystery: Today Gal(F_N/F_1)=GL2, whereas before it was SL_2.
%% Solution: Today we are over Q, before we were over C!
%%%%%%%%%%%%%%%%%%%%%%%

\section{Action of $\GL_2$}

Let $N>3$ be an integer and $E/\Q(j)$ an elliptic curve
with $j$-invariant $j(E)=j$. Then there is a Galois extension
$$\xymatrix{
{\cF_N=\Q(j)(E[N]/\{\pm 1\})}\ar@{-}[d]\\
{\cF_1=\Q(j)}
}
$$ 
with Galois group $\GL_2(\Z/N\Z)/\{\pm 1\}$.  Think of
$\Q(j)(E[N]/\{\pm 1\})$ as the field obtained from $\Q(j)$ by
adjoining the $x$-coordinates of the $N$-torsion points of $E$. Note
that this situation differs from the previous situation in
Section~\ref{sec:rhoEC} in that the base field $\C$ has been replaced
by $\Q$.

Consider $$\cF=\bigcup_{N}\cF_N$$
which corresponds to a projective system of modular curves
\index{modular curves}. 
Let $\A_f$ be the ring of finite ad\`{e}les; thus
$$\A_f=\hat{\Q}=\hat{\Z}\tensor\Q\subset\prod_{p}\Q_p.$$ 
We think of $\A_f$ as
$$\{(x_p)\in \prod \Q_p \, :\, x_p\in\Z_p \text{ for almost all $p$}\}.$$
The group $\GL_2(\A_f)$ acts on $\cF$.  
To understand what this action is we first consider the subgroup
$\GL_2(\hat{\Z})$ 
of $\GL_2(\A_f)$. 

It can be shown that 
$$\cF=\Q(f_{N,(r,s)} : (r,s)\in(\Z/N\Z)^2-\{(0,0)\}, N\geq{}1)$$
where $f_{N,(r,s)}$ is as defined
in Section~\ref{sec:rhoEC}.
We define an action of $\GL_2(\hat{\Z})$ on $\cF$ as follows.
To describe how $g\in\GL_2(\hat{\Z})$ acts on
$f_{N,(r,s)}$, first map $g$ into $\GL_2(\Z/N\Z)$ via the natural
reduction map, then note that $\GL_2(\Z/N\Z)$ acts on $f_{N,(r,s)}$ by
$$\Bigl(\begin{matrix}a&b\\c&d\end{matrix}\Bigr)\cdot{}f_{N,(r,s)}
  =f_{N,(r,s)\bigl(\begin{smallmatrix}a&b\\c&d\end{smallmatrix}\bigr)}
  =f_{N,(ra+sc,rb+sd)}.$$

Let $E$ be an elliptic curve. Then the universal Tate module is
$$T(E)=\varprojlim_{N\geq 1} E[N]=\prod_{p}T_p(E).$$
There is some isomorphism $\alpha:\hat{\Z}^2\iso T(E)$. 
Via right composition, $\GL_2(\hat{\Z})$ acts on the collection of 
all such isomorphisms $\alpha$. So $\GL_2(\hat{\Z})$ acts naturally
on pairs $(E,\alpha)$ with the action doing nothing to $E$. An
important point to be grasped when constructing objects like 
Shimura varieties\index{Shimura variety} is that we must 
``free ourselves'' and allow  $\GL_2(\hat{\Z})$ to act on 
the $E$'s as well.

Let 
$$g=\Bigl(\begin{matrix}a&b\\c&d\end{matrix}\Bigr)\in\GL_2^{+}(\Q).$$
Let $\tau\in\cH$ and let $E=E_{\tau}$ be the elliptic curve determined
by the lattice $\Lambda_{\tau}=\Z\tau+\Z$. Let 
$$
  \alpha_{\tau}:\Lambda_{\tau}=\Z\tau+\Z \iso\Z^2
$$
be the isomorphism defined by $\tau \mapsto(1,0)$ and
$1\mapsto (0,1)$.
Now view $\alpha=\alpha_{\tau}$ as a map
$$\alpha:\Z^2\iso H_1(E(\C),\Z).$$
Tensoring with $\Q$ then gives another map (also denoted $\alpha$)
$$\alpha:\Q^2\iso H_1(E,\Q).$$ 
Then $\alpha\circ g$ is another isomorphism 
$$
 \Q^2\xrightarrow{\alpha\circ g} H_1(E,\Q),
$$
which induces an isomorphism $\Z^2\iso{}L'\subset H_1(E,\Q)$
where $L'$ is a lattice.
There exists an elliptic curve $E'/\C$ and a map
$\lambda\in\Hom(E',E)\tensor\Q$, 
which induces a map (also denoted $\lambda$)
$$\lambda:H_1(E',\Z)\iso L'\subset H_1(E,\Q)$$
on homology groups.

Now we can define an action on pairs $(E,\alpha)$ by sending
$(E,\alpha)$ to $(E',\alpha')$. Here $\alpha'$ is the map
$\alpha':\Z^2\into H_1(E',\Z)$ given by the composition
$$\Z^2\xrightarrow{\alpha{}g}L'\xrightarrow{\lambda^{-1}}H_1(E',\Z).$$  

In more concrete terms the action is
$$g:(E_{\tau},\alpha_{\tau})\mapsto (E_{\tau}',\alpha_{\tau}')$$
where $\tau'=g\tau=\frac{a\tau+b}{c\tau+d}.$
%[[ CHECK THIS SOMETIME SOON!!]]

\chapter{Hecke Operators as Correspondences}

\comment{\section{Some philosophy} We are studying modular forms
over $\C$ and, more generally, over subrings $R$ of $\C$. The
Hecke algebras acts naturally via linear operators on various
spaces of modular forms. We are aiming for an arithmetic
perspective. One approach is to study the arithmetic of cusp forms
of weight 2 for congruence subgroups such as $\Gamma_0(N)$ or
$\Gamma_1(N)$. These cusp forms correspond to differentials on the
modular curves\index{modular curves} $X_0(N)$ and $X_1(N)$,
respectively. We have constructed models for each of these curves
over $\Q$.

When $N'|N$ there is a natural map $X(N)\into{}X(N')$. Thus
we get a tower of curves and a corresponding tower of number fields.
$$\xymatrix@=1.5pc{
   *+++[u]{\vdots}\ar[d] & *+++[u]{\vdots}\ar@{-}[d]\\
    X(N)\ar[d]    & {\cF_N} \ar@{-}[d]\\
    X(N')\ar[d]   & {\cF_{N'}} \ar@{-}[d]\\
   {\vdots} & {\vdots}
}$$

Taking limits gives a curve $X=\varprojlim{}X(N)$ and a corresponding
field $\cF=\varinjlim{}\cF_N$.

There is an action of $\GL_2(\A_f)$ on pairs $(E,\alpha)$. By $\A_f$ we mean
the ring of finite ad\`{e}les, which may be identified with
the restricted product $\prod_p^{'}\Q_p$. The subscript $f$,
for `finite', indicates that the infinite place is omitted.
The full ring of ad\`{e}les is $\A=\A_f\cross\R$.
If $g\in\GL_2(\A_f)$, then $g$ acts on pairs
$(E,\alpha)$ where $E$ is an elliptic curve and
$$\alpha:\hat{\Z}^2\iso{}T(E)=\prod_p T_p(E).$$
Note that
$$\A_f=\hat{\Z}\tensor_{\Z}\Q=\prod\Z_p\tensor_{\Z}\Q=\hat{\Q},$$
and $T(E)$ is free of rank $2$ over $\hat{\Z}$. Let
$$V(E)=T(E)\tensor_{\Z}\Q=\prod_{p}V_p(E)$$ where the product is
restricted and $V_p(E)=T_p(E)\tensor_{\Z_p}\Q_p$. View
$g\in\GL_2(\A_f)$ as an automorphism of $\hat{\Q}^2$. Then
$\alpha\circ g$ sends $\hat{\Z}^2\subset\hat{\Q}^2$ to a lattice
$T'\subset V(E)$. As a lemma, one shows that there is an elliptic
curve $E'$ and a canonical map $\lambda:E'\into E$ such that the
induced map $\lambda':V(E')\iso V(E)$ is an isomorphism which
sends $T(E')$ maps to $T'$ in $V(E)$. Then $g$ sends the pair
$(E,\alpha)$ to $(E',{\lambda'}^{-1}\circ\alpha\circ g)$.
}

Our goal is to view the Hecke operators $T_n$ and $\dbd{d}$ as
objects defined over $\Q$ that act in a compatible way on modular
forms, modular Jacobians, and homology. In order to do this, we
will define the Hecke operators as correspondences.


\section{The Definition}\label{sec:defn_hecke_corr}

\begin{definition}[Correspondence]
Let $C_1$ and $C_2$ be curves. A {\em correspondence}
$C_1\corrs{}C_2$ is a curve $C$ together with nonconstant morphisms
$\alpha:C\into C_1$ and $\beta:C\into C_2$.  We represent a
correspondence by a diagram
\[
  \corr{C}{C_1}{C_2}{\alpha}{\beta}
\]
Given a correspondence $C_1\corrs{}C_2$ the {\em dual
correspondence} $C_2\corrs{}C_1$ is obtained by looking at the
diagram in a mirror
\[
  \corr{C}{C_2}{C_1}{\beta}{\alpha}
\]
\end{definition}

In defining Hecke operators, we will focus on the simple case when
the modular curve is $X_0(N)$ and Hecke operator is $T_p$, where
$p\nd N$.  We will view $T_p$ as a correspondence $X_0(N)\corrs
X_0(N)$, so there is a curve $C=X_0(pN)$ and maps~$\alpha$
and~$\beta$ fitting into a diagram
\[
  \corr{X_0(pN)}{X_0(N)}{X_0(N).}{\alpha}{\beta}
\]
The maps $\alpha$ and $\beta$ are degeneracy maps which forget
data. To define them, we view $X_0(N)$ as classifying isomorphism
classes of pairs $(E,C)$, where~$E$ is an elliptic curve and~$C$
is a cyclic subgroup of order~$N$ (we will not worry about what
happens at the cusps, since any rational map of nonsingular curves
extends uniquely to a morphism). Similarly, $X_0(pN)$ classifies
isomorphism classes of pairs $(E,G)$ where $G=C\oplus{}D$, $C$ is
cyclic of order~$N$ and~$D$ is cyclic of order~$p$. Note that
since $(p,N)=1$, the group~$G$ is cyclic of order $pN$ and the
subgroups~$C$ and~$D$ are uniquely determined by~$G$. The
map~$\alpha$ forgets the subgroup~$D$ of order~$p$, and $\beta$
quotients out by~$D$:
\begin{align}\label{eqn:alphabeta}
  \alpha:(E,G)&\mapsto(E,C)\\
  \beta:(E,G)&\mapsto(E/D,(C+D)/D)
\end{align}

We translate this into the language of complex analysis by
thinking of $X_0(N)$ and $X_0(pN)$ as quotients of the upper half
plane. The first map~$\alpha$ corresponds to the map
\[
   \Gamma_0(pN)\backslash\h \to \Gamma_0(N)\backslash\h
\]
induced by the inclusion $\Gamma_0(pN) \hra \Gamma_0(N)$. The
second map~$\beta$ is constructed by composing the isomorphism
\begin{equation}\label{eqn:conjiso}
  \Gamma_0(pN)\backslash\h\iso
  \mtwo{p}{0}{0}{1}
   \Gamma_0(pN)
   \mtwo{p}{0}{0}{1}^{\!-1}
  \backslash\h
\end{equation}
with the map to $\Gamma_0(N)\backslash\h$ induced
by the inclusion
\[
 \mtwo{p}{0}{0}{1}
   \Gamma_0(pN)
  \mtwo{p}{0}{0}{1}^{-1} \subset \Gamma_0(N).
\]
The isomorphism (\ref{eqn:conjiso}) is induced by $z\mapsto
\smallmtwo{p}{0}{0}{1}z = pz$; explicitly, it is
\[
\Gamma_0(pN)z\mapsto \smallmtwo{p}{0}{0}{1}\Gamma_0(pN)
\smallmtwo{p}{0}{0}{1}^{-1}\smallmtwo{p}{0}{0}{1}z.
\]
(Note that this is well-defined.)


The maps $\alpha$ and $\beta$ induce pullback maps on differentials
\[
  \alpha^{*},\beta^{*}: \H^0(X_0(N),\Omega^1)\into
                        \H^0(X_0(pN),\Omega^1).
\]
We can identify $S_2(\Gamma_0(N))$ with $H^0(X_0(N),\Omega^1)$ by
sending the cusp form $f(z)$ to the holomorphic differential
$f(z)dz$.   Doing so, we obtain two maps
\[
  \alpha^{*},\beta^{*}: \,S_2(\Gamma_0(N))\to{} S_2(\Gamma_0(pN)).
\]

Since $\alpha$ is induced by the identity map on the upper half
plane, we have $\alpha^{*}(f)=f$, where we view~$f=\sum a_nq^n$ as
a cusp form with respect to the smaller group $\Gamma_0(pN)$.
Also, since $\beta^*$ is induced by $z\mapsto pz$, we have
\[
   \beta^{*}(f)= p\sum_{n=1}^{\infty}a_n{}q^{pn}.
\]
The factor of~$p$ is because
\[
  \beta^*(f(z) dz) = f(pz) d(pz) = p f(pz) dz.
\]

Let $X$, $Y$, and $C$ be curves, and~$\alpha$ and~$\beta$ be
nonconstant holomorphic maps, so we have a correspondence
\[
 \corr{C}{X}{Y.}{\alpha}{\beta}
\]
By first pulling back, then pushing forward, we obtain induced
maps on differentials
\[
  H^0(X,\Omega^1)\xrightarrow{\alpha^{*}}H^0(C,\Omega^1)
                  \xrightarrow{\beta_{*}}H^0(Y,\Omega^1).
\]
The composition $\beta_{*}\circ\alpha^{*}$ is a map
$H^0(X,\Omega^1)\into H^0(Y,\Omega^1).$
If we consider the dual correspondence, which is obtained
by switching the roles of~$X$ and~$Y$, we obtain a map
$H^0(Y,\Omega^1)\into H^0(X,\Omega^1).$

Now let $\alpha$ and $\beta$ be as in (\ref{eqn:alphabeta}).
Then we can recover the action of $T_p$ on modular forms
by considering the induced map
\[
  \beta_*\circ\alpha^*:H^0(X_0(N),\Omega^1)
            \into{}H^0(X_0(N),\Omega^1)
\]
and using that $S_2(\Gamma_0(N))\isom H^0(X_0(N),\Omega^1)$.

\comment{One can recover the explicit formula
\[
  T_p\left(\sum_{n\geq 1} a_n q^n\right) = \sum_{n\geq 1} a_{np}q^n+p\sum_{n\geq 1} a_n q^{np}.
\]
\edit{Add this back in when I can explain it well.} }

\section{Maps induced by correspondences}
In this section we will see how correspondences induce maps
on divisor groups, which in turn induce maps on Jacobians.

Suppose $\varphi:X\into Y$ is a morphism of curves. Let
$\Gamma\subset X\cross Y$ be the graph of~$\varphi$. This gives a
correspondence
\[\corr{\Gamma}{X}{Y}{\alpha}{\beta}\]
We can reconstruct~$\varphi$ from the correspondence by
using that $\varphi(x)=\beta(\alpha^{-1}(x))$.
[draw picture here]

More generally, suppose $\Gamma$ is a curve and
that $\alpha:\Gamma\into X$ has degree $d\geq 1$.
View $\alpha^{-1}(x)$ as a divisor on~$\Gamma$ (it is the formal sum
of the points lying over $x$, counted with appropriate multiplicities).
Then $\beta(\alpha^{-1}(x))$ is a divisor on~$Y$. We thus obtain a map
\[
 \Div^n(X)\xrightarrow{\beta\circ\alpha^{-1}}\Div^{dn}(Y),
\]
where $\Div^n(X)$ is the group of divisors of degree~$n$ on~$X$.
In particular, setting $d=0$, we obtain a map $\Div^0(X)\into \Div^0(Y).$

We now apply the above construction to $T_p$.
Recall that $T_p$ is the correspondence
\[
  \corr{X_0(pN)}{X_0(N)}{X_0(N),}{\alpha}{\beta}
\]
where $\alpha$ and $\beta$ are as in
Section~\ref{sec:defn_hecke_corr} and the induced map is
\[
  (E,C)\stackrel{\,\,\alpha^*}{\mapsto}\sum_{D\in E[p]}(E,C\oplus D)
       \stackrel{\,\beta_*}{\mapsto}\sum_{D\in E[p]}(E/D,(C+D)/D).
\]
Thus we have a map $\Div(X_0(N))\to \Div(X_0(N)).$
This strongly resembles the first definition we gave of $T_p$ on
level~$1$ forms, where $T_p$ was a correspondence
of lattices.

\section{Induced maps on Jacobians of curves}\index{Jacobian}
Let $X$ be a curve of genus $g$ over a field $k$.
Recall that there is an important association
\[
 \Bigl\{\text{ curves $X/k$ }\Bigr\} \longrightarrow
  \Bigl\{\text{ Jacobians $\Jac(X)=J(X)$ of curves }\Bigr\}
\]
between curves and their Jacobians.

\begin{definition}[Jacobian]
Let $X$ be a curve of genus~$g$ over a field~$k$.  Then the {\em Jacobian} of~$X$ is an abelian
variety of dimension~$g$ over~$k$ whose underlying group is functorially isomorphic to
the group of divisors of degree~$0$ on~$X$ modulo linear equivalence.  (For a more precise
definition, see Section~\ref{} (Jacobians section)\edit{insert this}.)
\end{definition}

There are many constructions of the Jacobian of a curve.  We first
consider the Albanese\index{Albanese} construction. Recall that
over $\C$, any abelian variety is isomorphic to $\C^g/L$, where
$L$ is a lattice (and hence a free $\Z$-module of rank $2g$).
There is an embedding
\begin{align*}
  \iota:\H_1(X,\Z)&\hookrightarrow \H^0(X,\Omega^1)^{*}\\
  \gamma&\mapsto\int_{\gamma} \bullet
\end{align*}
Then we realize $\Jac(X)$ as a quotient
\[
  \Jac(X)=\H^0(X,\Omega^1)^{*}/\iota(\H_1(X,\Z)).
\]
In this construction, $\Jac(X)$ is most naturally viewed as
covariantly associated to~$X$, in the
sense that if $X\to Y$ is a morphism of curves, then the resulting map
 $\H^0(X,\Omega^1)^{*}\to \H^0(Y,\Omega^1)^*$ on
tangent spaces induces a map $\Jac(X)\to \Jac(Y)$.

There are other constructions in which $\Jac(X)$ is
contravariantly associated to~$X$.  For example, if we view
$\Jac(X)$ as $\Pic^0(X)$, and $X\to Y$ is a morphism, then
pullback of divisor classes induces a map $\Jac(Y) = \Pic^0(Y)\to
\Pic^0(X) = \Jac(X)$.

If $F:X\corrs Y$ is a correspondence, then~$F$ induces an a map
$\Jac(X)\into \Jac(Y)$ and also a map $\Jac(Y)\into \Jac(X)$. If
$X=Y$, so that $X$ and $Y$ are the same, it can often be confusing
to decide which duality to use. Fortunately, for $T_p$, with~$p$
prime to ~$N$, it does not matter which choice we make. But it
matters a lot if $p\mid N$ since then we have non-commuting
confusable operators and this has resulted in mistakes in the
literature.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 2/26/96
%%%%%%%%%%%%

\section{More on Hecke operators}
Our goal is to move things down to $\Q$ from $\C$ or $\overline{\Q}$.
In doing this we want to understand $T_n$ (or $T_p$), that is, how
they act on the associated Jacobians\index{Jacobian} and how they can be viewed as
correspondences. In characteristic $p$ the formulas of Eichler-Shimura
\index{Eichler-Shimura}
will play an important role.

We consider $T_p$ as a correspondence on $X_1(N)$ or $X_0(N)$. To
avoid confusion we will mainly consider $T_p$ on $X_0(N)$ with $p\nd N$.
Thus assume, unless otherwise stated, that $p\nd N$.
Remember that $T_p$ was defined to be the correspondence
$$\corr{X_0(pN)}{X_0(N)}{X_0(N)}{\alpha}{\beta}$$
Think of $X_0(pN)$ as consisting of pairs $(\uE,D)$ where $D$ is
a cyclic subgroup of $E$ of order $p$ and $\uE$ is the {\em enhanced}
elliptic curve consisting of an elliptic curve $E$ along with a cyclic
subgroup of order $N$.  The degeneracy map $\alpha$ forgets
the subgroup $D$ and the degeneracy map $\beta$ divides by it.
By contravariant functoriality we have a commutative diagram
$$\xymatrix{
  H^0(X_0(N),\Omega^1)\ar[rr]^{T_p^{*}=\alpha_{*}\circ\beta^{*}}
             \ar@{=}[d]
       &&H^0(X_0(N),\Omega^1)\ar@{=}[d]\\
  S_2(\Gamma_0(N))\ar[rr]^{T_p}
       &&S_2(\Gamma_0(N))
}$$

Our convention to define $T_p^{*}$ as $\alpha_{*}\circ\beta^{*}$ instead
of $\beta_{*}\circ\alpha^{*}$ was completely psychological because
there is a canonical duality relating the two. We chose
the way we did because of the analogy with the case of
a morphism $\varphi:Y\into X$ with graph $\Gamma$ which
induces a correspondence
$$\corr{\Gamma}{Y}{X}{\pi_1}{\pi_2}$$
Since the morphism $\varphi$ induces a map on global sections in the
other direction
$$H^0(X,\Omega^1)=\Gamma(X)\xrightarrow{\varphi^{*}}
                        \Gamma(Y)=H^0(Y,\Omega^1)$$
it is psychologically natural for more general correspondence
such as $T_p$ to map from the right to the left.

The morphisms $\alpha$ and $\beta$ in the definition of $T_p$ are
defined over $\Q$. This can be seen using the general theory of
representable functors. Thus since $T_p$ is defined over $\Q$ most
of the algebraic geometric objects we will construct related to
$T_p$ will be defined over $\Q$.

\section{Hecke operators acting on Jacobians}\index{Jacobian}
The Jacobian $J(X_0(N))=J_0(N)$ is an abelian variety defined over
$\Q$. There are both covariant and contravariant ways to construct
$J_0(N)$. Thus a map $\alpha:X_0(pN)\into{}X_0(N)$ induces maps
$$\xymatrix{
J_0(pN)\ar@{=}[rr]        &&  J_0(pN)\ar[d]^{\alpha_{*}}\\
J_0(N)\ar[u]^{\alpha^{*}}\ar[rr]_{p+1} &&  J_0(N)
}$$
Note that $\alpha_{*}\circ\alpha^{*}:J_0(N)\into{}J_0(N)$
is just multiplication by $\deg(\alpha)=p+1$, since
there are $p+1$ subgroups of order $p$ in $\uE$. (At least
when $p\nd N$, when $p|N$ there are only $p$ subgroups.)

%We will often refer to $T_p$ as $\xi_p$ as Shimura\index{Shimura} does in his book.
There are two possible ways to define $T_p$ as an endomorphism of
$J_0(N)$. We could either define $T_p$ as
$\beta_{*}\circ\alpha^{*}$ or equivalently as
$\alpha_{*}\circ\beta^{*}$ (assuming still that $p\nd N$).

\subsection{The Albanese Map}\index{Albanese}
There is a way to map the curve $X_0(N)$ into its Jacobian\index{Jacobian}
since the underlying group structure of $J_0(N)$ is
$$J_0(N)=\frac{\Bigl\{\text{ divisors of degree $0$ on $X_0(N)$ }\Bigr\}}
              {\Bigl\{\text{ principal divisors }\Bigr\}}$$
Once we have chosen a rational point, say $\infty$, on $X_0(N)$ we obtain
the Albanese\index{Albanese} map
$$\theta:X_0(N)\into J_0(N): x\mapsto x-\infty$$
which sends a point $x$ to the divisor $x-\infty$.
The map $\theta$ gives us a way to pullback differentials on $J_0(N)$.
Let $\Cot J_0(N)$ denote the cotangent space of $J_0(N)$ (or the space
of regular differentials).
The diagram
$$\xymatrix{
\Cot J_0(N)\ar[d]^{\wr}_{\theta^*}   &&
          \Cot J_0(N) \ar[ll]_{\xi_p^{*}} \ar[d]^{\theta^{*}}_{\wr} \\
H^0(X_0(N),\Omega^1)&&H^0(X_0(N),\Omega^1)\ar[ll]_{T_p^{*}}
}$$
may be taken to give a definition of $\xi_p$ since
there is a unique endomorphism $\xi_p:J_0(N)\into J_0(N)$ inducing
a map $\xi_p^*$ which makes the diagram commute.

Now suppose $\Gamma$ is a correspondence $X\corrs{}Y$ so we
have a diagram
$$\corr{\Gamma}{X}{Y}{\alpha}{\beta}$$
For example, think of $\Gamma$ as the graph of a morphism
$\varphi:X\into Y$. Then $\Gamma$ should induce a natural map
$$H^0(Y,\Omega^1)\longrightarrow H^0(X,\Omega^1).$$
Taking Jacobians\index{Jacobian} we see that the composition
$$J(X)\xrightarrow{\alpha^{*}}J(\Gamma)\xrightarrow{\beta_{*}}J(Y)$$
gives a map $\beta_{*}\circ\alpha^{*}:J(X)\into J(Y)$. On cotangent spaces this
induces a map
$$\alpha^{*}\circ\beta_{*}:H^0(Y,\Omega^1)\into H^0(X,\Omega^1).$$

Now, after choice of a rational point, the map $X\into J(X)$
induces a map $\Cot J(X)\into H^0(X,\Omega^1)$. This is in fact
independent of the choice of rational point since differentials
on $J(X)$ are invariant under translation.

The map $J(X)\into J(Y)$ is preferred in the literature. It is
said to be induced by the Albanese\index{Albanese} functoriality of the Jacobian.
We could have just as easily defined a map from $J(Y)\into J(X)$.
To see this let
$$\psi=\beta_*\circ\alpha^{*}:J(X)\into J(Y).$$
Dualizing induces a map $\psi^{\dual}=\alpha_{*}\circ\beta^{*}$:
$$\xymatrix{
J(X)^{\dual}\ar[d]^{\isom}  &&
       J(Y)^{\dual} \ar[ll]_{\psi^{\dual}}\\
J(X) && J(Y)\ar[u]^{\isom}}
$$
Here we have used autoduality of Jacobians\index{Jacobian}.
This canonical duality is discussed in \cite{mumford:geometric} and
\cite{mumford:abvars} and in Milne's article in \cite{schilling}.

\subsection{The Hecke algebra}
We now have $\xi_p=T_p\in\End J_0(N)$ for every prime $p$. If
$p|N$, then we must decide between $\alpha_{*}\circ\beta^{*}$ and
$\beta_{*}\circ\alpha^{*}$. The usual choice is the one which
induces the usual $T_p$ on cusp forms. If you don't like your
choice you can get out of it with Atkin-Lehner operators.

Let
     $$\T=\Z[\ldots,T_p,\ldots]\subset\End J_0(N)$$
then $\T$ is the same as $\T_{\Z}\subset\End(S_2(\Gamma_0(N)))$.
To see this first note that there is a map
$\T\into\T_{\Z}$ which is not a prior injective, but which is
injective because elements of $\End J_0(N)$ are completely
determined by their action on $\Cot J_0(N)$.









\section{The Eichler-Shimura relation}\label{sec:eichler-shimura}
\index{Eichler-Shimura}
Suppose~$p\nmid N$ is a prime.  The Hecke operator $T_p$ and the
Frobenius automorphism $\Frob_p$ induce, by functoriality, elements of
$\End(J_0(N)_{\F_p})$, which we also denote $T_p$ and $\Frob_p$.  The
Eichler-Shimura relation asserts that the relation
\begin{equation}\label{eqn:es1}
   T_p = \Frob_p + p\Frob_p^{\vee}
\end{equation}
holds in $\End(J_0(N)_{\F_p})$.  In this section we sketch the main
idea behind why (\ref{eqn:es1}) holds.  For more details and a proof
of the analogous statement for $J_1(N)$, see
\cite{conrad:shimura}.\edit{Add more references to original source
materials...}

Since $J_0(N)$ is an abelian variety defined over~$\Q$, it is natural
to ask for the primes~$p$ such that $J_0(N)$ have good reduction.  In
the 1950s Igusa showed\edit{Ken, what's a reference for this?}  that
$J_0(N)$ has good reduction for all $p\nmid{}N$.  He viewed $J_0(N)$
as a scheme over $\Spec(\Q)$, then ``spread things out'' to make an
abelian scheme over $\Spec(\Z[1/N])$.  He did this by taking the
Jacobian\index{Jacobian} of the normalization\index{normalization} of
$X_0(N)$ (which is defined over $\Z[1/N]$) in $\P^n_{\Z[1/N]}$.

The Eichler-Shimura\index{Eichler-Shimura} relation is a formula for
$T_p$ in characteristic $p$, or more precisely, for the corresponding
endomorphisms in $\End(J_0(N)_{\F_p})$) for all~$p$ for which $J_0(N)$
has good reduction at~$p$. If $p\nmid N$, then $X_0(N)_{\F_p}$ has
many of the same properties as $X_0(N)_{\Q}$.  In particular, the
noncuspidal points on $X_0(N)_{\F_p}$ classify isomorphism classes of
enhanced elliptic curves $\uE=(E,C)$, where~$E$ is an elliptic curve
over $\bF_p$ and~$C$ is a cyclic subgroup of~$E$ of order~$N$.  (Note
that two pairs are considered {\em isomorphic} if they are isomorphic
over $\Fbar_p$.)

Next we ask what happens to the map $T_p:J_0(N)\into J_0(N)$ 
under reduction modulo~$p$.  
To this end, consider the correspondence
\[
  \corr{X_0(Np)}{X_0(N)}{X_0(N)}{\alpha}{\beta}
\]
that defines $T_p$.  The curve $X_0(N)$ has good reduction at~$p$, but
$X_0(Np)$ typically does not.  Deligne and Rapaport
\cite{deligne-rapoport} showed that $X_0(Np)$ has relatively benign
reduction at~$p$. Over $\bF_p$, the reduction $X_0(Np)_{\F_p}$ can be
viewed as two copies of $X_0(N)$ glued at the supersingular points,
as illustrated in Figure~\ref{fig:deligne-rapoport}.
\begin{figure}
\psfrag{A}{\small$X_0(N)$}
\psfrag{B}{\small$X_0(N)$}
\includegraphics[width=0.9\textwidth]{graphics/deligne-rapaport}
\caption{The reduction mod $p$ of the Deligne-Rapoport 
model of $X_0(Np)$%
\label{fig:deligne-rapoport}}
\end{figure}

The set of supersingular points
\[
  \Sigma\subset{}X_0(N)(\overline{\bF}_p)
\]
is the set of points in $X_0(N)$ represented by pairs $\uE=(E,C)$,
where~$E$ is a supersingular elliptic curve (so $E(\Fbar_p)[p]=0$).
There are exactly $g+1$ supersingular points, where~$g$ is the genus
of $X_0(N)$.\edit{Reference.}

\comment{Next we must understand the following constellation
$$\xymatrix{
X_0(N)\ar[dr]\ar[dd] &        & X_0(N)\ar[dl]\ar[dd]\\
       &X_0(Np)\ar[dl]_{\alpha}\ar[dr]^{\beta}\\
X_0(N) &        & X_0(N)
}$$}

Consider the correspondence $T_p:X_0(N)\corrs{}X_0(N)$ which takes an
enhanced elliptic curve $\uE$ to the sum $\sum \uE/D$ of all quotients
of $\uE$ by subgroups~$D$ of order~$p$. This is the correspondence
\begin{equation}\label{eqn:tp_corr}
  \corr{X_0(pN)}{X_0(N)}{X_0(N),}{\alpha}{\beta}
\end{equation}
where  the map~$\alpha$ forgets the subgroup of order~$p$, 
and~$\beta$ quotients out by it.
From this one gets $T_p:J_0(N)\into J_0(N)$ by
functoriality.  

\begin{remark}
There are many ways to think of $J_0(N)$. The cotangent space $\Cot
J_0(N)$ of $J_0(N)$ is the space of holomorphic (or translation
invariant) differentials on $J_0(N)$, which is isomorphic to
$S_2(\Gamma_0(N))$. This gives a connection between our geometric
definition of $T_p$ and the definition, presented earlier,\edit{more
precise} of $T_p$ as an operator on a space of cusp forms.
\end{remark}

The Eichler-Shimura relation takes place in $\End(J_0(N)_{\F_p})$.
\index{Eichler-Shimura}
Since $X_0(N)$ reduces ``nicely'' in characteristic $p$, we can
apply the Jacobian\index{Jacobian} construction to $X_0(N)_{\F_p}$. 
\begin{lemma}\label{lem:red_map_inj}
The natural reduction map
\[
  \End(J_0(N))\hookrightarrow \End(J_0(N)_{\F_p})
\]
is injective. 
\end{lemma}
\begin{proof}
Let $\ell\nmid Np$ be a prime.  
By \cite[Thm.~1, Lem.~2]{serre-tate}, 
the reduction to characteristic~$p$ map induces an isomorphism
\[
  J_0(N)(\Qbar)[\ell^\infty] \isom J_0(N)(\Fbar_p)[\ell^\infty].
\]
If $\vphi\in\End(J_0(N))$ reduces to the~$0$ map in 
$\End(J_0(N)_{\F_p})$, then $J_0(N)(\Qbar)[\ell^\infty]$
must be contained in $\ker(\vphi)$.  Thus $\vphi$ induces
the~$0$ map on $\Tate_\ell(J_0(N))$, so $\vphi=0$. 
\end{proof}

Let $F:X_0(N)_{\F_p}\into{}X_0(N)_{\F_p}$ be the Frobenius map in
characteristic~$p$.
Thus, if $K=K(X_0(N))$ is the function field of the nonsingular
curve $X_0(N)$, then $F:K\to K$ is induced by the $p$th power map
$a\mapsto{}a^p$.  
\begin{remark}
The Frobenius map corresponds to the $p$th powering map on points.
For example, if $X=\Spec(\Fp[t])$, and $z=(\Spec(\Fpbar)\to X)$ is a
point defined by a homomorphism $\alpha:\Fp[t]\mapsto \Fpbar$, then
$F(z)$ is the composite
$$\Fp[t] \xrightarrow{\quad x\mapsto x^p\quad }
   \Fp[t] \xrightarrow{\quad \alpha\quad } \Fpbar.$$
If $\alpha(t) = \xi$, then $F(z)(t) = \alpha(t^p) = \xi^p$.
\end{remark}

By both functorialities,~$F$ induces maps on the Jacobian of
$\xonp$:
\[
  \Frob_p=F_{*}\quad\text{and}\quad\Ver_p=\Frob_p^{\dual}=F^{*},
\]
which we illustrate as follows:
\[
  \xymatrix{
   {\jonp}\ar@/^1pc/[rr]^{\Ver_p} && {\jonp}\ar@/^1pc/[ll]^{\Frob_p}
  }
\]
Note that $\Ver_p\circ\Frob_p=\Frob_p\circ\Ver_p=[p]$ since~$p$ is the
degree of~$F$ (for example, if $K=\F_p(t)$, then $F(K)=\F_p(t^p)$
is a subfield of degree~$p$, so the map induced by~$F$ 
has degree~$p$).

\begin{theorem}[Eichler-Shimura Relation]
\index{Eichler-Shimura}
Let $N$ be a positive integer and $p\nmid N$ be a prime. 
Then the following relation holds:
\[
  T_p=\Frob_p + \Ver_p\in \End(J_0(N)_{\Fp}).
\]
\end{theorem}
\begin{proof}[Sketch of Proof]
We view $\xopnp$ as two copies of $\xonp$ glued along corresponding
supersingular points~$\Sigma$, as in Figure~\ref{fig:deligne-rapoport}.
This diagram and the correspondence (\ref{eqn:tp_corr}) that defines $T_p$
translate into the following diagram of schemes over $\F_p$:
\[
  \xymatrix{
   & {\,\Sigma\,}\ar@{_(->}[dl]\ar@{^(->}[dr] &\\
{\xonp\quad}\ar@{^(->}[dr]^{r}\ar[dd]^{\isom} &       
      & {\,\xonp}\ar@{_(->}[dl]_{s}\ar[dd]^{\isom}\\
      &*+[o]{\xopnp}\ar[dl]_{\alpha}\ar[dr]^{\beta} &  \\
\xonp &       & \xonp
 }
\]
The maps~$r$ and~$s$ are defined as follows.  Recall that a point of
$\xonp$ is an enhanced elliptic curve $\uE=(E,C)$ consisting of an
elliptic curve~$E$ (not necessarily defined over $\F_p$) along with a
cyclic subgroup~$C$ of order~$N$.  We view a point on $X_0(Np)$ as a
triple $(E,C,E\to E')$, where $(E,C)$ is as above and $E\to E'$ is an
isogeny of degree~$p$.  We use an isogeny instead of a cyclic subgroup
of order~$p$ because $E(\Fpbar)[p]$ has order either~$1$ or~$p$, so
the data of a cyclic subgroup of order~$p$ holds very little
information.

The map~$r$ sends~$\uE$ to~$(\uE,\vphi)$, where $\vphi$
is the isogeny of degree~$p$,
\[
  \vphi: E\xrightarrow{\Frob}E^{(p)}.
\]
Here $E^{(p)}$ is the curve obtained from~$E$ by
hitting all defining equations by Frobenious, that is, by
$p$th powering the coefficients of the defining equations
for~$E$. We introduce $E^{(p)}$ since if~$E$ is not defined
over $\F_p$, then Frobenious does not define an endomorphism
of~$E$. Thus~$r$ is the map
\[
  r:\quad\uE\mapsto(\uE,E\xrightarrow{\Frob_p}E^{(p)}),
\]
and similarly we define~$s$ to be the map
\[
  s:\quad\uE\mapsto(E^{(p)},C, E\xleftarrow{\Ver_p}E^{(p)})
\]
where $\Ver_p$ is the dual of $\Frob_p$ (so $\Ver_p\circ \Frob_p =
\Frob_p \circ \Ver_p = [p]$).  


We view~$\alpha$ as the map sending $(\uE, E\into E')$ to $\uE$, and
similarly we view~$\beta$ as the map sending $(\uE, E\into E')$ to
the pair $(E',C')$, where $C'$ is the image of~$C$ in $E'$ via
$E\to E'$.  Thus
\begin{align*}
 \alpha:&\quad (E\into{}E')\mapsto E\\
 \beta:&\quad(E'\into{}E)\mapsto E'\end{align*}
It now follows immediately that $\alpha\circ{}r=\id$ and
$\beta\circ{}s=\id$. Note also that
$\alpha\circ{}s=\beta\circ{}r=F$ is the map $E\mapsto{}E^{(p)}$.

Away from the finitely many supersingular points, 
we may view $\xopnp$ as the disjoint union
of two copies of $\xonp$.  Thus away from the supersingular
points, we have the following equality of correspondences:
\comment{\[
 \corr{\xopnp}{\xonp}{\xonp}{\alpha}{\beta}
\]
\[
\corr{\xopnp}{\xonp}{\xonp}{\alpha}{\beta}
  \txt{\\ \\\LARGE =}\corr{\xonp}{\xonp}{\xonp}
    {\id=\alpha\circ{}r}{F=\beta\circ{}r}
   \txt{\\ \\\LARGE +}\corr{\xonp}{\xonp}{\xonp,}
      {F=\alpha\circ{}s}{\id=\beta\circ{}s}
\]}
\[
\corr{\xopnp}{\xonp}{\xonp}{\alpha}{\beta}
  \!\!\!\!\!\!\txt{\\ \\ \\\LARGE $='$}\!\corr{\xonp}{\xonp}{\xonp}
    {\id=\alpha\circ{}r}{F=\beta\circ{}r}
   \!\!\txt{\\ \\ \\\LARGE +}\!\!\corr{\xonp}{\xonp}{\xonp,}
      {F=\alpha\circ{}s}{\id=\beta\circ{}s}
\]
where $F=\Frob_p$, and the $='$ means equality away from
the supersingular points.  Note that we are simply
``pulling back'' the correspondence; in the first summand
we use the inclusion~$r$, and in the second we use 
the inclusion~$s$.  

This equality of correspondences implies that the equality
\[
  T_p=\Frob_p + \Ver_p
\]
of endomorphisms holds on a dense subset of $J_0(N)_{\Fp}$, hence 
on all $J_0(N)_{\Fp}$.
\end{proof}

\section{Applications of the Eichler-Shimura relation}
\subsection{The Characteristic polynomial of Frobenius}
How can we apply the relation $T_p=\Frob+\Ver$ in $\End(\jonp)$?
Let $\ell\nmid pN$ be a prime and 
consider the $\ell$-adic Tate module
\[
 \Tate_{\ell}(\jon)=\left(\varprojlim\jon[\ell^{\nu}]\right)
 \tensor_{\Z_{\ell}}\Q_{\ell}
\]
which is a vector space of dimension $2g$ over $\Q_{\ell}$,
where $g$ is the genus of $X_0(N)$ or the dimension of $J_0(N)$. 
Reduction modulo~$p$ induces an isomorphism
\[
  \Tate_{\ell}(J_0(N)) \to \Tate_{\ell}(J_0(N)_{\Fp})
\]
(see the proof of Lemma~\ref{lem:red_map_inj}). 
On $\Tate_{\ell}(J_0(N)_\Fp)$ we have linear
operators $\Frob_p$, $\Ver_p$ and $T_p$ which, as we 
saw in Section~\ref{sec:eichler-shimura}, satisfy
\begin{align*}
\Frob_p+\Ver_p&=T_p,\qquad\text{and}\\
  \Frob_p\circ\Ver_p&=\Ver_p\circ\Frob_p=[p].
\end{align*}
The endomorphism $[p]$ is invertible on $\Tate_{\ell}(J_0(N)_{\Fp})$,
since~$p$ is prime to~$\ell$, so $\Ver_p$ and $\Frob_p$ are also
invertible and
\[
  T_p=\Frob_p+[p]\Frob_p^{-1}.
\] 
Multiplying both sides by $\Frob_p$ and rearranging, we see that
\[
  \Frob_p^2-T_p\Frob_p+[p]=0 \in \End(\Tate_{\ell}(J_0(N)_{\Fp})).
\]
This is a beautiful quadratic relation, so we should be able to get
something out of it.  We will come back to this shortly, but first we
consider the various objects acting on the $\ell$-adic Tate module.

The module $\Tate_{\ell}(\jon)$ is acted upon in a natural way by
\begin{enumerate}
\item The Galois group $\Gal(\Qbar/\Q)$ of $\Q$, and
\item $\End_{\Q}(J_0(N))\tensor_{\Z_{\ell}}\Q_{\ell}$ (which acts
by functoriality).
\end{enumerate}
These actions commute with each other since endomorphisms defined
over $\Q$ are not affected by the action of $\Gal(\Qbar/\Q)$.
Reducing modulo~$p$, we also have the following commuting actions:
\begin{enumerate}
\item[3.] The Galois group $\Gal(\overline{\F}_p/\Fp)$ of $\Fp$, and
\item[4.] $\End_{\Fp}(\jon)\tensor_{\Z_{\ell}}\Q_{\ell}$.
\end{enumerate}
Note that a decomposition group group $D_p\subset\Gal(\overline{\Q}/\Q)$
acts, after quotienting out by the corresponding inertia group, in the
same way as $\Gal(\overline{\F}_p/\Fp)$ and the action is unramified,
so action 3 is a special case of action 1.

The Frobenius elements $\vphi_p{}\in\Gal(\overline{\F}_p/\Fp)$ and
$\Frob_\in\End_{\Fp}(\jon)\tensor_{\Z_{\ell}}\Q_{\ell}$ induce the
same operator on $\Tate_\ell(J_0(N)_{\Fp})$.  Note that while $\vphi_p$
naturally lives in a quotient of a decomposition group, one often
takes a lift to get an element in $\Gal(\overline{\Q}/\Q)$.

On $\Tate_{\ell}(\jon_{\F_p})$ we have a quadratic relationship
\[
  \varphi_p^2-T_p\varphi_p+p=0.
\]
This relation plays a role when one separates out pieces of $J_0(N)$
in order to construct Galois representations attached to newforms of
weight~$2$.  Let
\[
  R=\Z[\ldots,T_p,\ldots]\subset\End J_0(N),
\]
where we only adjoin those $T_p$ with $p\nd N$.
Think of~$R$ as a reduced Hecke algebra; in particular,~$R$
is a subring of~$\T$. Then
\[
  R\tensor\Q=\prod_{i=1}^{r}E_i,
\]
where the $E_i$ are totally real number fields.
The factors $E_i$ are in bijection with the Galois conjugacy classes
of weight~$2$ newforms~$f$ on $\Gamma_0(M)$ (for some $M|N$).
The bijection is the map
\[
  f\mapsto\Q(\text{coefficients of $f$})=E_i
\]
Observe that the map is the same if we replace $f$ by one of its conjugates.
This decomposition is a decomposition of a subring
\[
  R\tensor\Q\subset\End(\jon)\tensor\Q
  \stackrel{\text{def}}{=}\End(\jon\tensor\Q).
\]
Thus it induces a direct product decomposition of
$J_0(N)$, so $J_0(N)$ gets divided up into subvarieties
which correspond to conjugacy classes of newforms.

The relationship 
\begin{equation}\label{eqn:frob_poly}
  \varphi_p^2-T_p\varphi_p+p=0
\end{equation}
suggests that
\begin{equation}\label{eqn:trdetphi}
  \tr(\varphi_p)=T_p\qquad\text{and}\quad\det\varphi_p=p.
\end{equation}
This is true, but (\ref{eqn:trdetphi}) does not follow formally 
just from the given quadratic relation.  It can be proved by 
combining (\ref{eqn:frob_poly}) with the Weil pairing.

\subsection{The Cardinality of $J_0(N)(\F_{p})$}
\begin{proposition}
Let $p\nmid N$ be a prime, and 
let~$f$ be the characteristic polynomial of $T_p$ acting on
$S_2(\Gamma_0(N))$.  Then
\[
  \# J_0(N)(\F_p) = f(p+1).
\]
\end{proposition}


\edit{Add details later, along with various generalizations.}\chapter{Abelian Varieties}

This chapter provides foundational background about abelian
varieties and Jacobians, with an aim toward what we will need
later when we construct abelian varieties attached to modular
forms.  We will not give complete proofs of very much, but will
try to give precise references whenever possible, and many
examples.

We will follow the articles by Rosen \cite{rosen:abvars} and Milne
\cite{milne:abvars} on abelian varieties.  We will try primarily
to explain the statements of the main results about abelian
varieties, and prove results when the proofs are not too technical
and enhance understanding of the statements.


\section{Abelian varieties}

\begin{definition}[Variety]
A {\em variety} $X$ over a field $k$ is a finite-type separated
scheme over $k$ that is geometrically integral.
\end{definition}
The condition that $X$ be geometrically integral means that
$X_{\kbar}$ is reduced (no nilpotents in the structure sheaf) and
irreducible.


\begin{definition}[Group variety]
A {\em group variety} is a group object in the category of
varieties. More precisely,  a group variety $X$ over a field~$k$
is a variety equipped with morphisms
\[
  m: X \times X \to X
\quad\text{and}\quad i:X\to X
\]
and a point $1_X\in A(k)$ such that $m$, $i$, and $1_X$ satisfy
the axioms of a group; in particular, for every $k$-algebra $R$
they give $X(R)$ a group structure that depends in a functorial
way on $R$.
\end{definition}

\begin{definition}[Abelian Variety]
An {\em abelian variety} $A$ over a field $k$ is a complete group
variety.
\end{definition}

\begin{theorem}\label{thm:abvar}
Suppose $A$ is an abelian variety.  Then
\begin{enumerate}
\item The group law on $A$ is commutative. \item $A$ is
projective, i.e., there is an embedding from $A$ into $\P^n$ for
some $n$. \item If $k=\C$, then $A(k)$ is analytically isomorphic
to $V/L$, where $V$ is a finite-dimensional complex vector space
and $L$ is a lattice in $V$. (A lattice is a free $\Z$-module of
rank equal to $2\dim V$ such that $\R L=V$.)
\end{enumerate}
\end{theorem}
\begin{proof}
Part 1  is not too difficult, and can be proved by showing that
every morphism  of abelian varieties is the composition of a
homomorphism with a translation, then applying this result to the
inversion map (see \cite[Cor.~2.4]{milne:abvars}).   Part 2 is
proved with some effort in \cite[\S7]{milne:abvars}.  Part 3 is
proved in \cite[\S I.1]{mumford:abvars} using the exponential map
from Lie theory from the tangent space at $0$ to $A$.
\end{proof}

\section{Complex tori}
Let $A$ be an abelian variety over $\C$.   By
Theorem~\ref{thm:abvar}, there is a complex vector space  $V$ and
a lattice $L$ in $V$ such that $A(\C)=V/L$, that is to say,
$A(\C)$ is a complex torus.

More generally, if $V$ is any complex  vector space and $L$ is a
lattice in $V$, we call the quotient $T=V/L$ a {\em complex
torus}.  In this section, we prove some results about complex tori
that will help us to understand the structure of abelian
varieties, and will also be useful in designing algorithms for
computing with abelian varieties.

The differential $1$-forms and first homology of a complex torus
are easy to understand in terms of $T$.  If $T=V/L$ is a complex
torus, the tangent space to $0\in T$ is canonically isomorphic to
$V$. The $\C$-linear dual $V^*=\Hom_\C(V,\C)$ is isomorphic to the
$\C$-vector space $\Omega(T)$ of holomorphic differential
$1$-forms on $T$. Since $V\to T$ is the universal covering of $T$,
the first homology $\H_1(T,\Z)$ of $T$ is canonically isomorphic
to $L$.

\subsection{Homomorphisms}
Suppose $T_1=V_1/L_1$ and $T_2=V_2/L_2$ are two complex tori.  If
$\vphi:T_1\to T_2$ is a (holomorphic) homomorphism, then $\vphi$
induces a $\C$-linear map from the tangent space of $T_1$ at $0$
to the tangent space of $T_2$ at $0$.  The tangent space of $T_i$
at $0$ is canonically isomorphic to $V_i$, so $\vphi$ induces a
$\C$-linear map $V_1\to V_2$.  This maps sends $L_1$ into $L_2$,
since $L_i=\H_1(T_i,\Z)$.  We thus have the following diagram:
\begin{equation}\label{eqn:unifmorph}
\xymatrix{
0 \ar[d] & 0 \ar[d] \\
L_1 \ar[r]^{\rho_\Z(\vphi)}\ar[d] & L_2\ar[d]\\
V_1 \ar[r]^{\rho_\C(\vphi)}\ar[d] & L_2\ar[d]\\
T_1 \ar[r]^{\vphi}\ar[d] & T_2\ar[d]\\
  0  & 0
}
\end{equation}

We obtain two faithful representations of $\Hom(T_1,T_2)$,
\[
 \rho_\C: \Hom(T_1,T_2) \to \Hom_\C(V_1,V_2)
\]
\[
\rho_\Z: \Hom(T_1,T_2) \to \Hom_\Z(L_1,L_2).
\]

%IS THIS TRUE OR NOT??
%\begin{remark}
%Suppose $A_1$ and $A_2$ are abelian varieties.  Then every
%homomorphism $A_1\to A_2$ induces a homomorphism of the
%corresponding complex tori $T_i=A_i(\C)$.   However, not every
%homomorphism $T_1\to T_2$ of complex tori arises from an algebraic
%homomorphism $A_1\to A_2$.
%\end{remark}

Suppose $\psi\in \Hom_\Z(L_1,L_2)$.  Then $\psi=\rho_\Z(\vphi)$
for some $\vphi\in\Hom(T_1,T_2)$ if and only if there is a complex
linear homomorphism $f:V_1 \to V_2$ whose restriction to $L_1$ is
$\psi$.  Note that $f=\psi\tensor\R$ is uniquely determined by
$\psi$, so $\psi$ arises from some $\vphi$ precisely when $f$ is
$\C$-linear. This is the case if and only if $fJ_1=J_2f$, where
$J_n:V_n\to V_n$ is the $\R$-linear map induced by multiplication
by $i=\sqrt{-1}\in\C$.

\begin{example}\mbox{}\vspace{-4ex}\\%
\begin{enumerate}%
\item Suppose $L_1 = \Z + \Z{}i\subset V_1=\C$.   Then with
respect to the basis $1, i$, we have
$J_1=\smallmtwo{0}{-1}{1}{\hfill0}$.  One finds that $\Hom(T_1,
T_1)$ is the free $\Z$-module of rank~$2$ whose image via
$\rho_\Z$ is generated by $J_1$ and $\smallmtwo{1}{0}{0}{1}$.  As
a ring
$\Hom(T_1,T_1)$ is isomorphic to $\Z[i]$.%

\item Suppose $L_1 = \Z + \Z{}\alpha i\subset V_1=\C$, with
$\alpha^3=2$. Then with respect to the basis $1, \alpha i$, we
have $J_1=\smallmtwo{\hfill 0}{-\alpha}{1/\alpha}{\hfill 0}$.
Only the scalar integer matrices commute with $J_1$.
\end{enumerate}
\end{example}



\begin{proposition}
Let $T_1$ and $T_2$ be complex tori.  Then $\Hom(T_1,T_2)$ is a
free $\Z$-module of rank at most $4\dim T_1\cdot \dim T_2$.
\end{proposition}
\begin{proof}
The representation $\rho_\Z$ is faithful (injective) because
$\vphi$ is determined by its action on $L_1$, since $L_1$ spans
$V_1$.  Thus $\Hom(T_1,T_2)$ is isomorphic to a subgroup of
$\Hom_\Z(L_1,L_2)\isom \Z^d$, where $d=2\dim V_1 \cdot 2 \dim
V_2$.
\end{proof}

\begin{lemma}\label{lem:tori_hom}
Suppose $\vphi:T_1\to T_2$ is a homomorphism of complex tori. Then
the image of $\vphi$ is a subtorus of $T_2$ and the connected
component of $\ker(\vphi)$ is a subtorus of $T_1$ that has finite
index in $\ker(\vphi)$.
\end{lemma}
\begin{proof}
Let $W=\ker(\rho_\C(\vphi))$. Then the following diagram, which is
induced by $\vphi$, has exact rows and columns:
\[
\xymatrix{
   & 0 \ar[d] & 0 \ar[d] & 0\ar[d] \\
 0\ar[r] & L_1\meet W\ar[d]\ar[r]& L_1\ar[r]\ar[d] & L_2 \ar[r]\ar[d]&
 L_2/\vphi(L_1)\ar[r]\ar[d] & 0\\
 0\ar[r] & W\ar[d]\ar[r]& V_1\ar[r]\ar[d] & V_2 \ar[r]\ar[d]&
 V_2/\vphi(V_1)\ar[r]\ar[d] & 0\\
  0\ar[r] & \ker(\vphi)\ar[r]& T_1\ar[r]\ar[d] & T_2 \ar[r]\ar[d]&
 T_2/\vphi(T_1)\ar[r]\ar[d] & 0\\
   & & 0& 0& 0\\
}
\]
Using the snake lemma, we obtain an exact sequence
\[
 0\to L_1\meet W \to W \to \ker(\vphi) \to L_2/\vphi(L_1)\to
 V_2/\vphi(V_1) \to T_2/\vphi(T_1) \to 0.
\]
Note that $T_2/\vphi(T_1)$ is compact because it is the continuous
image of a compact set, so the cokernel of $\vphi$ is a torus (it
is given as a quotient of a complex vector space by a lattice).

The kernel $\ker(\vphi)\subset T_1$ is a closed subset of the
compact set $T_1$, so is compact.  Thus $L_1\meet W$ is a lattice
in $W$.   The map $L_2/\vphi(L_1)\to V_2/\vphi(V_1)$ has kernel
generated by the saturation of $\vphi(L_1)$ in $L_2$, so it is
finite, so the torus $W/(L_1\meet W)$ has finite index in
$\ker(\vphi)$.
\end{proof}



\begin{remark} The category of complex tori is not an abelian
category because kernels need not be in the category.
\end{remark}


\subsection{Isogenies}
\begin{definition}[Isogeny]
An {\em isogeny} $\vphi:T_1\to T_2$ of complex tori is a
surjective morphism with finite kernel.  The {\em degree}
$\deg(\vphi)$ of $\vphi$ is the order of the kernel of $\vphi$.
\end{definition}


Note that $\deg(\vphi\circ \vphi')=\deg(\vphi)\deg(\vphi')$.

\begin{lemma}\label{lem:tori_coker}
Suppose that $\vphi$ is an isogeny.  Then the kernel of $\vphi$ is
isomorphic to the cokernel of $\rho_\Z(\vphi)$.
\end{lemma}
\begin{proof}
(This is essentially a special case of Lemma~\ref{lem:tori_hom}.)
Apply the snake lemma to the morphism (\ref{eqn:unifmorph}) of
short exact sequences, to obtain a six-term exact sequence
\[
  0 \to K_L \to K_V \to K_T \to C_L \to C_V \to C_T \to 0,
\]
where $K_X$ and $C_X$ are the kernel and cokernel of $X_1\to X_2$,
for $X=L,V,T$, respectively.  Since $\vphi$ is an isogeny, the
induced map $V_1\to V_2$ must be an isomorphism, since otherwise
the kernel would contain a nonzero subspace (modulo a lattice),
which would be infinite.  Thus $K_V=C_V=0$.   It follows that
$K_T\isom C_L$, as claimed.
\end{proof}

One consequence of the lemma is that if $\vphi$ is an isogeny,
then
$$\deg(\vphi)=[L_1:\rho_{\Z}(\vphi)(L_1)]=|\det(\rho_\Z(\vphi))|.$$

\begin{proposition}
Let $T$ be a complex torus of dimension $d$, and let $n$ be a
positive integer. Then multiplication by $n$, denoted $[n]$, is an
isogeny $T\to T$ with kernel $T[n]\isom (\Z/n\Z)^{2d}$ and degree
$n^{2d}$.
\end{proposition}
\begin{proof}
By Lemma~\ref{lem:tori_coker}, $T[n]$ is isomorphic to $L/n L$,
where $T=V/L$.   Since $L\ncisom \Z^{2d}$, the proposition
follows.
\end{proof}

We can now prove that isogeny is an equivalence relation.
\begin{proposition}
Suppose $\vphi:T_1\to T_2$ is a degree~$m$ isogeny of complex tori
of dimension~$d$.  Then there is a unique isogeny
$\hat{\vphi}:T_2\to T_1$ of degree $m^{2d-1}$ such that
$\hat{\vphi}\circ \vphi = \vphi\circ \hat{\vphi} = [m]$.
\end{proposition}
\begin{proof}
Since $\ker(\vphi)\subset \ker([m])$, the map $[m]$ factors
through $\vphi$, so there is a morphism $\hat{\vphi}$ such that
$\hat{\vphi}\circ \vphi = [m]$:
\[
\xymatrix{
 T_1 \ar[r]^{\vphi}\ar[dr]_{[m]} & T_2\ar[d]^{\hat{\vphi}}\\
    & T_1}
\]

We have
\[
(\vphi\circ \hat{\vphi} - [m])\circ \vphi
 =\vphi\circ\hat{\vphi}\circ\phi - [m]\circ\vphi
 =\vphi\circ\hat{\vphi}\circ\phi - \vphi\circ[m]
 =\vphi\circ(\hat{\vphi}\circ\phi - [m]) = 0.
\]
This implies that $\vphi\circ \hat{\vphi} =[m]$, since $\vphi$ is
surjective.  Uniqueness is clear since the difference of two such
morphisms would vanish on the image of $\vphi$. To see that
$\hat{\vphi}$ has degree $m^{2d-1}$, we take degrees on both sides
of the equation $\hat{\vphi}\circ \vphi = [m]$.
\end{proof}

\subsection{Endomorphisms}
The ring $\End(T)=\Hom(T,T)$ is called the {\em endomorphism ring}
of the complex torus~$T$.  The {\em endomorphism algebra} of $T$
is $\End_0(T) = \End(T)\tensor_\Z\Q$.

\begin{definition}[Characteristic polynomial]
The {\em characteristic polynomial} of $\vphi\in\End(T)$ is the
characteristic polynomial of the $\rho_\Z(\vphi)$.  Thus the
characteristic polynomial is a monic polynomial of degree $2\dim
T$.
\end{definition}


\section{Abelian varieties as complex tori}
In this section we introduce extra structure on a complex torus
$T=V/L$ that will enable us to understand whether or not $T$ is
isomorphic to $A(\C)$, for some abelian variety $A$ over~$\C$.
When $\dim T=1$, the theory of the Weierstrass $\wp$ function
implies that $T$ is always $E(\C)$ for some elliptic curve. In
contrast, the generic torus of dimension $>1$ does not arise from
an abelian variety.

In this section we introduce the basic structures on complex tori
that are needed to understand which tori arise from abelian
varieties, to construct the dual of an abelian variety, to see
that $\End_0(A)$ is a semisimple $\Q$-algebra, and to understand
the polarizations on an abelian variety.   For proofs, including
extensive motivation from the one-dimensional case, read the
beautifully written book \cite{swinnerton-dyer:abvars} by
Swinnerton-Dyer, and for another survey that strongly influenced
the discussion below, see Rosen's \cite{rosen:abvars}.

%If $A$ is an abelian variety over~$\C$, then the global
%holomorphic functions on $A$ are just the scalars, since $A(\C)$
%is a projective variety.  However, the rational functions on $A$
%are a finitely generated field of transcendence degree equal to
%the dimension of~$A$, so $A$ possesses many rational functions,
%something that is not the case for generic tori.

\subsection{Hermitian and Riemann forms}
Let $V$ be a finite-dimensional complex vector space.
\begin{definition}[Hermitian form]
A {\em Hermitian form} is a conjugate-symmetric pairing
\[
  H:V\times V \to \C
\]
that is~$\C$-linear in the first variable and $\C$-antilinear in
the second.  Thus~$H$ is $\R$-bilinear,
$H(iu,v)=iH(u,v)=H(u,\overline{i}v)$, and
$H(u,v)=\overline{H(v,u)}$.
\end{definition}

Write $H=S+iE$, where $S,E:V\times V\to\R$ are real bilinear
pairings.
\begin{proposition}
Let $H$, $S$, and $E$ be as above.%
\begin{enumerate}
\item  We have that $S$ is symmetric, $E$ is antisymmetric, and
\[
  S(u,v) = E(iu,v), \quad S(iu,iv)=S(u,v),\quad E(iu,iv)=E(u,v).
\]
\item Conversely, if $E$ is a real-valued antisymmetric bilinear
pairing on~$V$ such that $E(iu,iv)=E(u,v)$, then
$H(u,v)=E(iu,v)+iE(u,v)$ is a Hermitian form on~$V$.  Thus there
is a bijection between the Hermitian forms on $V$ and the real,
antisymmetric bilinear forms $E$ on $V$ such that
$E(iu,iv)=E(u,v)$.
\end{enumerate}
\end{proposition}
\begin{proof}
To see that~$S$ is symmetric, note that $2S=H+\overline{H}$ and
$H+\overline{H}$ is symmetric because~$H$ is conjugate symmetric.
Likewise, $E=(H-\overline{H})/(2i)$, so
\[
  E(v,u)=\frac{1}{2i}\left(H(v,u)-\overline{H(v,u)}\right)
        =\frac{1}{2i}\left(\overline{H(u,v)}-H(u,v)\right)
        = -E(u,v),
\]
which implies that~$E$ is antisymmetric.  To see that
$S(u,v)=E(iu,v)$, rewrite both $S(u,v)$ and $E(iu,v)$ in terms
of~$H$ and simplify to get an identity.  The other two identities
follow since
\[H(iu,iv) = iH(u,iv)= i\overline{i}H(u,v)=H(u,v).\]

Suppose $E:V\times V\to \R$ is as in the second part of the
proposition.  Then
\[
 H(iu,v) = E(i^2u,v) + i E(iu,v) = -E(u,v) + i E(iu,v) = iH(u,v),
\]
and the other verifications of linearity and antilinearity are
similar.  For conjugate symmetry, note that
\begin{align*}
  H(v,u)&=E(iv,u)+iE(v,u)=-E(u,iv)-iE(u,v)\\
      &=-E(iu,-v)-iE(u,v)=H(u,v).
\end{align*}
\end{proof}

Note that the set of Hermitian forms is a group under addition.

\begin{definition}[Riemann form]
A {\em Riemann form} on a complex torus $T=V/L$ is a Hermitian
form $H$ on $V$ such that the restriction of $E=\Im(H)$ to $L$ is
integer valued.  If $H(u,u)\geq 0$ for all $u\in V$ then $H$ is
{\em positive semi-definite} and if $H$ is positive and $H(u,u)=0$
if and only if $u=0$, then $H$ is {\em nondegenerate}.
\end{definition}

\begin{theorem}
Let $T$ be a complex torus.  Then $T$ is isomorphic to $A(\C)$,
for some abelian variety $A$, if and only if there is a
nondegenerate Riemann form on~$T$.
\end{theorem}
This is a nontrivial theorem, which we will not prove here.   It
is proved in \cite[Ch.2]{swinnerton-dyer:abvars} by defining an
injective map from positive divisors on $T=V/L$ to positive
semi-definite Riemann forms, then constructing positive divisors
associated to theta functions on $V$.  If $H$ is a nondegenerate
Riemann form on $T$, one computes the dimension of a space of
theta functions that corresponds to~$H$ in terms of the
determinant of $E=\Im(H)$. Since $H$ is nondegenerate, this space
of theta functions is nonzero, so there is a corresponding
nondegenerate positive divisor $D$.  Then a basis for
\[L(3D)=\{f \,:\, (f) + 3D\text{ is positive }\,\}\cup \{0\}\]
determines an embedding of $T$ in a projective space.

Why the divisor $3D$ instead of~$D$ above? For an elliptic curve
$y^2=x^3+ax+b$, we could take $D$ to be the point at infinity.
Then $L(3D)$ consists of the functions with a pole of order at
most~$3$ at infinity, which contains $1$, $x$, and $y$, which have
poles of order $0$, $2$, and $3$, respectively.


\begin{remark} (Copied from page 39 of
\cite{swinnerton-dyer:abvars}.) When $n=\dim V>1$, however, a
general lattice $L$ will admit no nonzero Riemann forms.  For if
$\lambda_1,\ldots, \lambda_{2n}$ is a base for $L$ then $E$ as an
$\R$-bilinear alternating form is uniquely determined by the
$E(\lambda_i,\lambda_j)$, which are integers; and the condition
$E(z,w)=E(iz,iw)$ induces linear relations with real coefficients
between $E(\lambda_i,\lambda_j)$, which for general $L$ have no
nontrivial integer solutions.
\end{remark}

\subsection{Complements, quotients, and semisimplicity of the endomorphism algebra}

\begin{lemma}\label{lem:subtori_is_abvar}
If $T$ possesses a nondegenerate Riemann form and $T'\subset T$ is
a subtorus, then $T'$ also possesses a nondegenerate Riemann form.
\end{lemma}
\begin{proof}
If $H$ is a nondegenerate Riemann form on a torus $T$ and $T'$ is
a subtorus of $T$, then the restriction of $H$ to $T'$ is a
nondegenerate Riemann form on $T'$ (the restriction is still
nondegenerate because~$H$ is positive definite).
\end{proof}
 Lemma~\ref{lem:subtori_is_abvar} and
Lemma~\ref{lem:tori_hom} together imply that the kernel of a
homomorphism of abelian varieties is an extension of an abelian
variety by a finite group.


\begin{lemma}\label{lem:tori_abvar_isog}
If $T$ possesses a nondegenerate Riemann form and $T\to T'$ is an
isogeny, then $T'$ also possesses a nondegenerate Riemann form.
\end{lemma}
\begin{proof}
Suppose $T=V/L$ and $T'=V'/L'$.  Since the isogeny is induced by
an isomorphism $V\to V'$ that sends $L$ into $L'$, we may assume
for simplicity that $V=V'$ and $L\subset L'$.  If $H$ is a
nondegenerate Riemann form on $V/L$, then $E=\Re(H)$ need not be
integer valued on $L'$.  However, since $L$ has finite index in
$L'$, there is some integer $d$ so that $dE$ is integer valued on
$L'$.  Then $dH$ is a nondegenerate Riemann form on $V/L'$.
\end{proof}
Note that Lemma~\ref{lem:tori_abvar_isog} implies that the
quotient of an abelian variety by a finite subgroup is again an
abelian variety.

\begin{theorem}[Poincare
Reducibility]\label{thm:poincare_reducibility}%
Let $A$ be an abelian variety and suppose $A'\subset A$ is an
abelian subvariety.  Then there is an abelian variety $A''\subset
A$ such that $A=A'+A''$ and $A'\meet A''$ is finite.  (Thus $A$ is
isogenous to $A'\times A''$.)
\end{theorem}
\begin{proof}
We have $A(\C)\ncisom V/L$ and there is a nondegenerate Riemann
form~$H$ on~$V/L$.  The subvariety $A'$ is isomorphic to $V'/L'$,
where $V'$ is a subspace of~$V$ and $L'=V'\meet L$. Let $V''$ be
the orthogonal complement of $V'$ with respect to $H$, and let
$L''=L\meet V''$.  To see that $L''$ is a lattice in $V''$, it
suffices to show that $L''$ is the orthogonal complement of $L'$
in $L$ with respect to~$E=\Im(H)$, which, because $E$ is integer
valued, will imply that $L''$ has the correct rank.  First,
suppose that $v\in L''$; then, by definition,~$v$ is in the
orthogonal complement of $L'$ with respect to~$H$, so for any
$u\in L'$, we have $0=H(u,v)=S(u,v)+i E(u,v)$, so $E(u,v)=0$.
Next, suppose that $v\in L$ satisfies $E(u,v)=0$ for all $u\in
L'$.  Since $V'=\R L'$ and~$E$ is $\R$-bilinear, this implies
$E(u,v)=0$ for any $u\in V'$.  In particular, since $V'$ is a
complex vector space, if $u\in L'$, then $S(u,v) = E(iu,v)=0$, so
$H(u,v)=0$.

We have shown that $L''$ is a lattice in $V''$, so $A''=V''/L''$
is an abelian subvariety of $A$.  Also $L'+L''$ has finite index
in $L$, so there is an isogeny $V'/L' \oplus V''/L'' \to V/L$
induced by the natural inclusions.
\end{proof}

\begin{proposition}
Suppose $A'\subset A$ is an inclusion of abelian varieties.  Then
the quotient $A/A'$ is an abelian variety.
\end{proposition}
\begin{proof}
Suppose $A=V/L$ and $A'=V'/L'$, where $V'$ is a subspace of~$V$.
Let $W=V/V'$ and $M=L/(L\meet V')$.  Then, $W/M$ is isogenous to
the complex torus $V''/L''$ of
Theorem~\ref{thm:poincare_reducibility} via the natural map
$V''\to W$.  Applying Lemma~\ref{lem:tori_abvar_isog} completes
the proof.
\end{proof}

\begin{definition}
An abelian variety $A$ is {\em simple} if it has no nonzero proper
abelian subvarieties.
\end{definition}

\begin{proposition}
The algebra $\End_0(A)$ is semisimple.
\end{proposition}
\begin{proof}
Using Theorem~\ref{thm:poincare_reducibility} and induction, we
can find an isogeny
\[
  A \isog A_1^{n_1}\times A_2^{n_2}\times \cdots \times A_r^{n_r}
\]
with each $A_i$ simple.  Since $\End_0(A)=\End(A)\tensor\Q$ is
unchanged by isogeny, and $\Hom(A_i,A_j)=0$ when $i\neq j$, we
have
\[
 \End_0(A) = \End_0(A_1^{n_1}) \times \End_0(A_2^{n_2}) \times
 \cdots \times \End_0(A_r^{n_r})
\]
Each of $\End_0(A_i^{n_i})$ is isomorphic to $M_{n_i}(D_i)$, where
$D_i=\End_0(A_i)$.  By Schur's Lemma, $D_i=\End_0(A_i)$ is a
division algebra over~$\Q$ (proof: any nonzero endomorphism has
trivial kernel, and any injective linear transformation of a
$\Q$-vector space is invertible), so $\End_0(A)$ is a product of
matrix algebras over division algebras over~$\Q$, which proves the
proposition.
\end{proof}


\subsection{Theta functions}

Suppose $T=V/L$ is a complex torus.

\begin{definition}[Theta function]
Let $M:V\times L \to C$ and $J:L\to \C$ be set-theoretic maps such
that for each $\lambda\in L$ the map $z\mapsto M(z,\lambda)$ is
$\C$-linear.  A {\em theta function} of type $(M,J)$ is a function
$\theta:V\to \C$ such that for all $z\in V$ and $\lambda\in L$, we
have
\[
  \theta(z+\lambda) = \theta(z)\cdot \exp(2\pi i(
  M(z,\lambda)+J(\lambda))).
\]
\end{definition}
Suppose that $\theta(z)$ is a nonzero holomorphic theta function
of type $(M,J)$.  The $M(z,\lambda)$, for various $\lambda$,
cannot be unconnected.  Let $F(z,\lambda)=2\pi
i(M(z,\lambda)+J(\lambda))$.
\begin{lemma}
For any $\lambda, \lambda'\in L$, we have
\[
 F(z,\lambda+\lambda') =
 F(z+\lambda,\lambda')+F(z,\lambda)\pmod{2\pi i}.
\]
Thus
\begin{equation}\label{eqn:msum}
  M(z,\lambda+\lambda') = M(z,\lambda) + M(z,\lambda'),
\end{equation}
and
\[
 J(\lambda+\lambda') - J(\lambda) - J(\lambda') \con
 M(\lambda,\lambda')\pmod{\Z}.
\]
\end{lemma}
\begin{proof}
Page 37 of \cite{swinnerton-dyer:abvars}.
\end{proof}
Using (\ref{eqn:msum}) we see that $M$ extends uniquely to a
function $\tilde{M}:V\times V\to\C$ which is $\C$-linear in the
first argument and $\R$-linear in the second.  Let
\[
  E(z,w) = \tilde{M}(z,w) - M(w,z),
\]
\[
  H(z,w) = E(iz,w) + iE(z,w).
\]
\begin{proposition}
The pairing $H$ is Riemann form on $T$ with real part $E$.
\end{proposition}
We call $H$ the Riemann form associated to $\theta$.

\section{A Summary of duality and polarizations}%\\(10/10/03 notes for Math 252 by William Stein)}
Suppose $A$ is an abelian variety over an arbitrary field~$k$.  In
this section we summarize the most important properties of the
dual abelian variety $A^{\vee}$ of~$A$.  First we review the
language of sheaves on a scheme~$X$, and define the Picard group
of $X$ as the group of invertible sheaves on~$X$. The dual of $A$
is then a variety whose points correspond to elements of the
Picard group that are algebraically equivalent to $0$. Next, when
the ground field is $\C$, we describe how to view $A^{\vee}$ as a
complex torus in terms of a description of $A$ as a complex torus.
We then define the N\'eron-Severi group of~$A$ and relate it to
polarizations of~$A$, which are certain homomorphisms $A\to
A^{\vee}$.  Finally we observe that the dual is functorial.

\subsection{Sheaves}
We will use the language of sheaves, as in \cite{hartshorne},
which we now quickly recall.  A {\em pre-sheaf of abelian groups}
$\cF$ on a scheme $X$ is a contravariant functor from the category
of open sets on $X$ (morphisms are inclusions) to the category of
abelian groups. Thus for every open set $U\subset X$ there is an
abelian group $\cF(U)$, and if $U\subset V$, then there is a
restriction map $\cF(V)\to \cF(U)$. (We also require that
$\cF(\emptyset)=0$, and the map $\cF(U)\to \cF(U)$ is the identity
map.)  A {\em sheaf} is a pre-sheaf whose sections are determined
locally (for details, see \cite[\S{}II.1]{hartshorne}).

Every scheme~$X$ is equipped with its structure sheaf $\O_X$,
which has the property that if $U=\Spec(R)$ is an affine open
subset of~$X$, then $\O_X(U)=R$.  A {\em sheaf of $\O_X$-modules}
is a sheaf $\cM$ of abelian groups on~$X$ such that each abelian
group has the structure of $\O_X$-module, such that the
restriction maps are module morphisms.  A {\em locally-free sheaf}
of $\O_X$-modules is a sheaf $\cM$ of $\O_X$-modules, such
that~$X$ can be covered by open sets~$U$ so that $\cM|_U$ is a
free $\O_X$-module, for each~$U$.


\subsection{The Picard group}
An {\em invertible sheaf} is a sheaf $\cL$ of $\O_X$-modules that
is locally free of rank~$1$.  If $\cL$ is an invertible sheaf,
then the sheaf-theoretic Hom, $\cL^{\vee}=\mathcal{H}{\rm
om}(\cL,\O_X)$ has the property that $\cL^{\vee}\tensor\cL =
\O_X$. The group $\Pic(X)$ of invertible sheaves on a scheme~$X$
is called {\em the Picard group} of~$X$. See
\cite[\S{}II.6]{hartshorne} for more details.

Let $A$ be an abelian variety over a field~$k$.  An invertible
sheaf $\cL$ on $A$ is {\em algebraically equivalent to $0$} if
there is a connected variety $T$ over~$k$, an invertible sheaf
$\cM$ on $A\times_k T$, and $t_0,t_1\in T(k)$ such that
$\cM_{t_0}\isom \cL$ and $\cM_{t_1}\isom \O_A$.
 Let $\Pic^0(A)$ be
the subgroup of elements of $\Pic(A)$ that are algebraically
equivalent to~$0$.

The {\em dual}~$A^{\vee}$ of~$A$ is a (unique up to isomorphism)
abelian variety such that for every field $F$ that contains the
base field~$k$, we have $A^{\vee}(F)=\Pic^0(A_F)$.  For the
precise definition of $A^{\vee}$ and a proof that $A^{\vee}$
exists, see \cite[\S 9--10]{milne:abvars}.


\subsection{The Dual as a complex torus}
When $A$ is defined over the complex numbers, so $A(\C)=V/L$ for
some vector space~$V$ and some lattice~$L$,
\cite[\S4]{rosen:abvars} describes a construction of $A^{\vee}$ as
a complex torus, which we now describe.  Let
\[
  V^* = \{f \in \Hom_\R(V,\C) \,:\, f(\alpha t) = \overline{\alpha}
  f(t),\,\text{ all }\, \alpha\in\C,\,t\in V\}.
\]
Then $V^*$ is a complex vector space of the same dimension as~$V$
and the map $\langle f,v\rangle = \Im f(t)$ is an $\R$-linear
pairing $V^*\times V\to\R$. Let
\[
  L^*=\{f\in V^* \, : \, \langle f, \lambda\rangle \in\Z, \text{
  all }\lambda\in L\}.
\]

Since $A$ is an abelian variety, there is a nondegenerate Riemann
form~$H$ on~$A$.  The map $\lambda:V\to V^*$ defined by
$\lambda(v)=H(v,\cdot)$ is an isomorphism of complex vector
spaces. If $v\in L$, then $\lambda(v)=H(v,\cdot)$ is integer
valued on~$L$, so $\lambda(L)\subset L^*$.  Thus $\lambda$ induces
an isogeny of complex tori $V/L \to V^*/L^*$, so by
Lemma~\ref{lem:tori_abvar_isog} the torus $V^*/L^*$ possesses a
nondegenerate Riemann form (it's a multiple of~$H$).  In
\cite[\S4]{rosen:abvars}, Rosen describes an explicit isomorphism
between $V^*/L^*$ and $A^{\vee}(\C)$.

\subsection{The N\'eron-Severi group and polarizations}
Let $A$ be an abelian variety over a field~$k$.  Recall that
$\Pic(A)$ is the group of invertible sheaves on~$A$, and
$\Pic^0(A)$ is the subgroup of invertible sheaves that are
algebraically equivalent to~$0$.  The {\em N\'eron-Severi group}
of $A$ is the quotient $\Pic(A)/\Pic^0(A)$, so by definition we
have an exact sequence
\[
  0 \to \Pic^0(A) \to \Pic(A) \to \NS(A)\to 0.
\]

Suppose $\cL$ is an invertible sheaf on~$A$.  One can show that
the map $A(k)\to \Pic^0(A)$ defined by $a \mapsto t_a^*\cL \tensor
\cL^{-1}$ is induced by homomorphism $\vphi_\cL:A\to A^{\vee}$.
(Here $t_a^*\cL$ is the pullback of the sheaf $\cL$ by translation
by~$a$.) Moreover, the map $\cL\mapsto \vphi_\cL$ induces a
homomorphism from $\Pic(A)\to \Hom(A,A^{\vee})$ with kernel
$\Pic^0(A)$.   The group $\Hom(A,A^{\vee})$ is free of finite
rank, so $\NS(A)$ is a free abelian group of finite rank. Thus
$\Pic^0(A)$ is saturated in $\Pic(A)$ (i.e., the cokernel of the
inclusion $\Pic^0(A)\to \Pic(A)$ is torsion free).

\begin{definition}[Polarization]
A {\em polarization} on $A$ is a homomorphism $\lambda:A\to
A^{\vee}$ such that $\lambda_{\kbar} = \vphi_{\cL}$ for some
$\cL\in\Pic(A_{\kbar})$.  A polarization is {\em principal} if it
is an isomorphism.
\end{definition}

When the base field~$k$ is algebraically closed, the polarizations
are in bijection with the elements of $\NS(A)$.  For example, when
$\dim A=1$, we have $\NS(A)=\Z$, and the polarizations on~$A$ are
multiplication by $n$, for each integer~$n$.

\subsection{The Dual is functorial}
The association $A\mapsto A^{\vee}$ extends to a contravariant
functor on the category of abelian varieties.  Thus if $\vphi:A\to
B$ is a homomorphism, there is a natural choice of homomorphism
$\vphi^{\vee}:B^{\vee}\to A^{\vee}$.  Also, $(A^{\vee})^{\vee}=A$
and $(\vphi^{\vee})^{\vee}=\vphi$.

Theorem~\ref{thm:dual_exact_sequence} below describes the kernel
of $\vphi^{\vee}$ in terms of the kernel of $\vphi$.  If~$G$ is a
finite group scheme, the {\em Cartier dual} of~$G$ is
$\Hom(G,\G_m)$.  For example, the Cartier dual of $\Z/m\Z$ is
$\mu_m$ and the Cartier dual of $\mu_m$ is $\Z/m\Z$.  (If $k$ is
algebraically closed, then the Cartier dual of $G$ is just $G$
again.)

\begin{theorem}\label{thm:dual_exact_sequence}
If $\vphi:A\to B$ is a surjective homomorphism of abelian
varieties with kernel~$G$, so we have an exact sequence $0\to G
\to A\to B\to 0$, then the kernel of $\vphi^{\vee}$ is the Cartier
dual of $G$, so we have an exact sequence $0\to G^{\vee}\to
B^{\vee}\to A^{\vee}\to 0$.
\end{theorem}

\section{Jacobians of curves}
We begin this lecture about Jacobians with an inspiring quote of David
Mumford:
\begin{quote}
``The Jacobian has always been a corner-stone in the analysis of
algebraic curves and compact Riemann surfaces. [...] Weil's
construction [of the Jacobian] was the basis of his epoch-making
proof of the Riemann Hypothesis for curves over finite fields,
which really put characteristic~$p$ algebraic geometry on its
feet.''  -- Mumford, \emph{Curves and Their Jacobians}, page 49.%
\end{quote}


\subsection{Divisors on curves and linear equivalence}
Let $X$ be a projective nonsingular algebraic curve over an
algebraically field~$k$.  A {\em divisor} on $X$ is a formal
finite $\Z$-linear combination $\sum_{i=1}^m n_i P_i$ of closed
points in $X$.   Let $\Div(X)$ be the group of all divisors
on~$X$.  The {\em degree} of a divisor $\sum_{i=1}^m n_i P_i$ is
the integer $\sum_{i=1}^m n_i$.  Let $\Div^0(X)$ denote the
subgroup of divisors of degree~$0$.

Suppose $k$ is a perfect field (for example, $k$ has
characteristic $0$ or $k$ is finite), but do not require that $k$
be algebraically closed. Let the group of divisors on $X$ over~$k$
be the subgroup
\[
  \Div(X) = \Div(X/k) = \H^0(\Gal(\kbar/k),\Div(X/\kbar))
\]
of elements of $\Div(X/\kbar)$ that are fixed by every
automorphism of $\kbar/k$.  Likewise, let $\Div^0(X/k)$ be the
elements of $\Div(X/k)$ of degree~$0$.

A {\em rational function} on an algebraic curve~$X$ is a function
$X\to \P^1$, defined by polynomials, which has only a finite
number of poles.  For example, if~$X$ is the elliptic curve
over~$k$ defined by $y^2=x^3+ax+b$, then the field of rational
functions on~$X$ is the fraction field of the integral domain
$k[x,y]/(y^2-(x^3+ax+b))$.  Let $K(X)$ denote the field of all
rational functions on~$X$ defined over~$k$.

There is a natural homomorphism $K(X)^* \to \Div(X)$ that
associates to a rational function~$f$ its divisor
\[
(f) = \sum \ord_P(f) \cdot P
\]
where $\ord_P(f)$ is the order of vanishing of $f$ at $P$. Since
$X$ is nonsingular, the local ring of $X$ at a point $P$ is
isomorphic to $k[[t]]$.  Thus we can write $f=t^r g(t)$ for some
unit $g(t)\in k[[t]]$.  Then $R=\ord_P(f)$.

\begin{example}
If $X=\P^1$, then the function $f=x$ has divisor $(0)-(\infty)$.
If $X$ is the elliptic curve defined by $y^2=x^3+ax+b$, then
\[
 (x) = (0,\sqrt{b}) + (0,-\sqrt{b}) - 2 \infty,
\]
and
\[
 (y) = (x_1,0) + (x_2,0) + (x_3,0) - 3 \infty,
\]
where $x_1$, $x_2$, and $x_3$ are the roots of $x^3+ax+b=0$. A
uniformizing parameter $t$ at the point $\infty$ is $x/y$.  An
equation for the elliptic curve in an affine neighborhood of
$\infty$ is $Z=X^3+aXZ^2+bZ^3$ (where $\infty=(0,0)$ with respect
to these coordinates) and $x/y=X$ in these new coordinates.   By
repeatedly substituting $Z$ into this equation we see that $Z$ can
be written in terms of~$X$.
\end{example}

It is a standard fact in the theory of algebraic curves that
if~$f$ is a nonzero rational function, then $(f)\in \Div^0(X)$,
i.e., the number of poles of~$f$ equals the number of zeros
of~$f$.  For example, if $X$ is the Riemann sphere and $f$ is a
polynomial, then the number of zeros of $f$ (counted with
multiplicity) equals the degree of~$f$, which equals the order of
the pole of~$f$ at infinity.

The {\em Picard group} $\Pic(X)$ of~$X$ is the group of divisors
on~$X$ modulo linear equivalence.  Since divisors of functions
have degree~$0$, the subgroup $\Pic^0(X)$ of divisors on~$X$ of
degree~$0$, modulo linear equivalence, is well defined.  Moreover,
we have an exact sequence of abelian groups
\[
  0 \to K(X)^* \to \Div^0(X) \to \Pic^0(X) \to 0.
\]

Thus for any algebraic curve $X$ we have associated to it an
abelian group $\Pic^0(X)$.   Suppose $\pi: X\to Y$ is a morphism
of algebraic curves.  If $D$ is a divisor on $Y$, the pullback
$\pi^*(D)$ is a divisor on~$X$, which is defined as follows.  If
$P\in \Div(Y/\kbar)$ is a point, let $\pi^*(P)$ be the sum $\sum
e_{Q/P} Q$ where $\pi(Q)=P$ and $e_{Q/P}$ is the ramification
degree of $Q/P$.  (Remark: If~$t$ is a uniformizer at~$P$ then
$e_{Q/P}=\ord_Q(\pi^*t_{P})$.)   One can show that
$\pi^*:\Div(Y)\to \Div(X)$ induces a homomorphism $\Pic^0(Y)\to
\Pic^0(X)$.   Furthermore, we obtain the contravariant {\em Picard
functor} from the category of algebraic curves over a fixed base
field to the category of abelian groups, which sends~$X$ to
$\Pic^0(X)$ and $\pi:X\to Y$ to $\pi^*:\Pic^0(Y)\to \Pic^0(X)$.

Alternatively, instead of defining morphisms by pullback of
divisors, we could consider the push forward.  Suppose $\pi:X\to
Y$ is a morphism of algebraic curves and~$D$ is a divisor on~$X$.
If $P\in \Div(X/\kbar)$ is a point, let $\pi_*(P)=\pi(P)$.  Then
$\pi_*$ induces a morphism $\Pic^0(X)\to \Pic^0(Y)$.  We again
obtain a functor, called the covariant {\em Albanese functor} from
the category of algebraic curves to the category of abelian
groups, which sends~$X$ to $\Pic^0(X)$ and $\pi:X\to Y$ to
$\pi_*:\Pic^0(X)\to \Pic^0(Y)$.

\subsection{Algebraic definition of the Jacobian}

First we describe some universal properties of the Jacobian under
the hypothesis that $X(k)\neq \emptyset$.  Thus suppose~$X$ is an
algebraic curve over a field~$k$ and that $X(k)\neq \emptyset$.
The Jacobian variety of~$X$ is an abelian variety~$J$ such that
for an extension $k'/k$, there is a (functorial) isomorphism
$J(k')\to \Pic^0(X/k')$.  (I don't know whether this condition
uniquely characterizes the Jacobian.)

Fix a point $P\in X(k)$.  Then we obtain a map $f:X(k)\to
\Pic^0(X/k)$ by sending $Q\in X(k)$ to the divisor class of $Q-P$.
One can show that this map is induced by an injective morphism of
algebraic varieties $X\hra J$.  This morphism has the following
universal property: if $A$ is an abelian variety and $g:X\to A$ is
a morphism that sends $P$ to $0\in A$, then there is a unique
homomorphism $\psi:J\to A$ of abelian varieties such that
$g=\psi\circ f$:
\[
\xymatrix{
 X \ar[r]^{f}\ar[dr]_g & J\ar[d]^{\psi}\\
      & A
 }
\]
This condition uniquely characterizes~$J$, since if $f':X\to J'$
and $J'$ has the universal property, then there are unique maps
$J\to J'$ and $J'\to J$ whose composition in both directions must
be the identity (use the universal property with $A=J$ and $f=g$).

If $X$ is an arbitrary curve over an arbitrary field, the Jacobian
is an abelian variety that represents the ``sheafification'' of
the ``relative Picard functor''.  Look in Milne's article or
Bosch-L\"uktebohmert-Raynaud {\em Neron Models} for more details.
Knowing this totally general definition won't be important for
this course, since we will only consider Jacobians of modular
curves, and these curves always have a rational point, so the
above properties will be sufficient.

A useful property of Jacobians is that they are canonically
principally polarized, by a polarization that arises from the
``$\theta$ divisor'' on $J$.  In particular, there is always an
isomorphism $J\to J^{\vee}=\Pic^0(J)$.

\subsection{The Abel-Jacobi theorem}
Over the complex numbers, the construction of the Jacobian is
classical.  It was first considered in the 19th century in order
to obtain relations between integrals of rational functions over
algebraic curves (see Mumford's book, {\em Curves and Their
Jacobians}, Ch. III, for a nice discussion).

Let $X$ be a Riemann surface, so $X$ is a one-dimensional complex
manifold.  Thus there is a system of coordinate charts $(U_\alpha,
t_\alpha)$, where $t_\alpha:U_\alpha\to \C$ is a homeomorphism of
$U_\alpha$ onto an open subset of $\C$, such that the change of
coordinate maps are analytic isomorphisms.  A {\em differential
$1$-form} on $X$ is a choice of two continuous functions~$f$ and
$g$ to each local coordinate $z=x+iy$ on $U_\alpha\subset X$ such
that $f \,dx + g\,dy$ is invariant under change of coordinates
(i.e., if another local coordinate patch $U_\alpha'$ intersects
$U_\alpha$, then the differential is unchanged by the change of
coordinate map on the overlap).  If $\gamma:[0,1]\to X$ is a path
and $\omega=f\,dx + g\,dy$ is a $1$-form, then
\[
  \int_{\gamma} \omega :=
  \int_{0}^{1} \left( f(x(t),y(t)) \frac{dx}{dt} +  g(x(t),y(t))\frac{dy}{dt}\right)\, dt \in \C.
\]
From complex analysis one sees that if $\gamma$ is homologous to
$\gamma'$, then $\int_\gamma \omega = \int_{\gamma'}\omega$.  In
fact, there is a nondegenerate pairing
\[
   \H^0(X,\Omega^1_{X}) \times \H_1(X,\Z) \to \C
\]

If $X$ has genus~$g$, then it is a standard fact that the complex
vector space $\H^0(X,\Omega^1_{X})$ of holomorphic differentials
on~$X$ is of dimension~$g$.  The integration pairing defined above
induces a homomorphism from integral homology to the dual~$V$ of
the differentials:
\[
\Phi:  \H_1(X,\Z) \to V=\Hom(H^0(X,\Omega^1_X), \C).
\]
This homomorphism is called the {\em period mapping}.

\begin{theorem}[Abel-Jacobi]
The image of $\Phi$ is a lattice in $V$.
\end{theorem}
The proof involves repeated clever application of the residue
theorem.

The intersection pairing
\[
  \H_1(X,\Z)\times \H_1(X,\Z) \to \Z
\]
defines a nondegenerate alternating pairing on
$L=\Phi(\H_1(X,\Z))$.  This pairing satisfies the conditions to
induce a nondegenerate Riemann form on $V$, which gives $J=V/L$ to
structure of abelian variety.  The abelian variety $J$ is the
Jacobian of~$X$, and if $P\in X$, then the functional
$\omega\mapsto \int_{P}^Q \omega$ defines an embedding of~$X$
into~$J$.  Also, since the intersection pairing is perfect, it
induces an isomorphism from $J$ to $J^{\vee}$.

\begin{example}
For example, suppose $X=X_0(23)$ is the modular curve attached to
the subgroup $\Gamma_0(23)$ of matrices in $\SL_2(\Z)$ that are
upper triangular modulo~$24$.  Then $g=2$, and a basis for
$\H_1(X_0(23),\Z)$ in terms of modular symbols is
\[
    \{-1/19, 0\},\quad
    \{-1/17, 0\},\quad
    \{-1/15, 0\},\quad
    \{-1/11, 0\}.
\]
The matrix for the intersection pairing on this basis is
\[
\left(\begin{matrix}0&-1&-1&-1\\1&0&-1&-1\\1&1&0&-1\\1&1&1&0\end{matrix}\right)
\]
With respect to a reduced integral basis for
$$\H^0(X,\Omega^1_X) \isom S_2(\Gamma_0(23)),$$
the lattice $\Phi(\H_1(X,\Z))$ of periods is (approximately)
spanned by
\begin{verbatim}
[
    (0.59153223605591049412844857432 - 1.68745927346801253993135357636*i
        0.762806324458047168681080323846571478727 - 0.60368764497868211035115379488*i),
    (-0.59153223605591049412844857432 - 1.68745927346801253993135357636*i
        -0.762806324458047168681080323846571478727 - 0.60368764497868211035115379488*i),
    (-1.354338560513957662809528899804 - 1.0837716284893304295801997808568748714097*i
        -0.59153223605591049412844857401 + 0.480083983510648319229045987467*i),
    (-1.52561264891609433736216065099 0.342548176804273349105263499648)
]
\end{verbatim}
\end{example}
%

\subsection{Every abelian variety is a quotient of a Jacobian}
Over an infinite field, {\em every} abelin variety can be obtained
as a quotient of a Jacobian variety.  The modular abelian
varieties that we will encounter later are, by definition, exactly
the quotients of the Jacobian $J_1(N)$ of $X_1(N)$ for some~$N$.
In this section we see that merely being a quotient of a Jacobian
does not endow an abelian variety with any special properties.

\begin{theorem}[Matsusaka]\label{thm:jacvarcover}
Let $A$ be an abelian variety over an algebraically closed field.
Then there is a Jacobian $J$ and a surjective map $J\to A$.
\end{theorem}
This was originally proved in {\em On a generating curve of an
abelian variety}, Nat. Sc. Rep. Ochanomizu Univ. {\bf 3} (1952),
1--4.  Here is the Math Review by P. Samuel:
\begin{quote}
An abelian variety $A$ is said to be generated by a variety $V$
(and a mapping $f$ of $V$ into $A$) if $A$ is the group generated
by $f(V)$. It is proved that every abelian variety $A$ may be
generated by a curve defined over the algebraic closure of
$\text{def}(A)$. A first lemma shows that, if a variety $V$ is the
carrier of an algebraic system $(X(M))_{M\in U}$ of curves ($X(M)$
being defined, non-singular and disjoint from the singular bunch
of $V$ for almost all $M$ in the parametrizing variety $U$) if
this system has a simple base point on $V$, and if a mapping $f$
of $V$ into an abelian variety is constant on some $X(M_0)$, then
$f$ is a constant; this is proved by specializing on $M_0$ a
generic point $M$ of $U$ and by using specializations of cycles
[Matsusaka, Mem. Coll. Sci. Kyoto Univ. Ser. A. Math.  26,
167--173 (1951); these Rev. 13, 379]. Another lemma notices that,
for a normal projective variety $V$, a suitable linear family of
plane sections of $V$ may be taken as a family $(X(M))$. Then the
main result follows from the complete reducibility theorem. This
result is said to be the basic tool for generalizing Chow's
theorem ("the Jacobian variety of a curve defined over $k$ is an
abelian projective variety defined over $k$").
\end{quote}
Milne \cite[\S10]{milne:abvars} proves the theorem under the
weaker hypothesis that the base field is infinite.  We briefly
sketch his proof now. If $\dim A=1$, then $A$ is the Jacobian of
itself, so we may assume $\dim A>1$. Embed $A$ into $\P^n$, then,
using the Bertini theorem, cut $A\subset \P^n$ by hyperplane
sections $\dim(A)-1$ times to obtain a nonsingular curve~$C$
on~$A$ of the form $A\meet V$, where~$V$ is a linear subspace of
$\P^n$.  Using standard arguments from Hartshorne
\cite{hartshorne}, Milne shows (Lemma 10.3) that if $W$ is a
nonsingular variety and $\pi:W\to A$ is a finite morphism, then
$\pi^{-1}(C)$ is geometrically connected (the main point is that
the pullback of an ample invertible sheaf by a finite morphism is
ample).  (A morphism $f:X\to Y$ is {\em finite} if for every open
affine subset $U=\Spec(R)\subset Y$, the inverse image
$f^{-1}(U)\subset X$ is an affine open subset $\Spec(B)$ with $B$
a finitely generated $R$-{\bf module}.  Finite morphisms have
finite fibers, but not conversely.) We assume this lemma and
deduce the theorem.

Let $J$ be the Jacobian of $C$; by the universal property of
Jacobians there is a unique homomorphism $f:J\to A$ coming from
the inclusion $C\hra A$.  The image $A_1=f(J)$ is an abelian
subvariety since images of homomorphisms of abelian varieties are
abelian varieties.  By the Poincare reducibility theorem (we only
proved this over $\C$, but it is true in general), there is an
abelian subvariety $A_2\subset A$ such that $A_1+A_2=A$ and
$A_1\cap A_2$ is finite. The isogeny $g:A_1\times A_2\to A$ given
by $g(x,y)=x+y\in A$ is a finite morphism (any isogeny of abelian
varieties is finite, flat, and surjective by Section~8 of
\cite{milne:abvars}). The inverse image $g^{-1}(A_1)$ is a union
of $\#(A_1\cap A_2)$ irreducible components; if this intersection
is nontrivial, then likewise $g^{-1}(C)$ is reducible, which is a
contradiction. This does not complete the proof, since it is
possible that~$g$ is an isomorphism, so we use one additional
trick. Suppose~$n$ is a positive integer coprime to the residue
characteristic, and let
$$h=1\times [n]:A_1\times A_2\to A_1\times A_2$$ be the identity
map on the first factor and multiplication by~$n$ on the second.
Then $h$ is finite and $(h\circ g)^{-1}(A_1)$ is a union of
$n^{2\dim A_2}=\deg(h)$ irreducible components, hence $(h\circ
g)^{-1}(C)$ is reducible, a contradiction.

 %
\begin{question}
Is Theorem~\ref{thm:jacvarcover} false for some abelian
variety~$A$ over some finite field~$k$?
\end{question}
\begin{question}[Milne]
Using the theorem we can obtain a sequence of Jacobian varieties
$J_1, J_2, \ldots$ that form a complex
\[
  \cdots \to J_2 \to J_1 \to A \to 0.
\]
(In each case the image of $J_{i+1}$ is the connected component of
the kernel of $J_i\to J_{i-1}$.) Is it possible to make this
construction in such a way that the sequence terminates in $0$?
\end{question}
\begin{question}[Yau]
Let $A$ be an abelian variety.  What can be said about the minimum
of the dimensions of all Jacobians $J$ such that there is a
surjective morphism $J\to A$?
\end{question}

\begin{remark}
Brian Conrad has explained to the author that if $A$ is an abelian
variety over an infinite field, then $A$ can be embedded in a
Jacobian~$J$.  This does not follow directly from
Theorem~\ref{thm:jacvarcover} above, since if $J\onto A^{\vee}$,
then the dual map $A\to J$ need not be injective.
\end{remark}

\section{N\'eron models}

The main references for N\'eron models are as follows:
\begin{enumerate}
\item {[AEC2]}: Silverman, {\em Advanced Topics in the Arithmetic
of Elliptic Curves}.  Chapter IV of this book contains an
extremely well written and motivated discussion of N\'eron models
of elliptic curves over Dedekind domains with perfect residue
field. In particular, Silverman gives an almost complete
construction of N\'eron models of elliptic curves.  Silverman very
clearly really
wants his reader to understand the construction.  Highly recommended.%
\item {[BLR]}: Bosch, L\"utkebohmert, Raynaud, {\em N\'eron
Models}. This is an excellent and accessible book that contains a
complete construction of N\'eron models and some of their
generalizations, a discussion of their functorial properties, and
a sketch of the construction of Jacobians of families of curves.
The goal of this book was to redo in scheme-theoretic language
N\'eron original paper, which is written in a language that was
ill-adapted to the
subtleties of N\'eron models.%
\item Artin, {\em N\'eron Models}, in Cornell-Silverman. This is
the first-ever exposition of N\'eron's original paper in the
language of schemes.
\end{enumerate}


\subsection{What are N\'eron models?}
Suppose~$E$ is an elliptic curve over~$\Q$.  If $\Delta$ is the
minimal discriminant of~$E$, then~$E$ has good reduction at $p$
for all $p\nmid \Delta$, in the sense that $E$ extends to an
abelian scheme $\cE$ over $\Z_p$ (i.e., a ``smooth'' and
``proper'' group scheme).  One can not ask for $E$ to extend to an
abelian scheme over~$\Z_p$ for all $p\mid \Delta$.  One can,
however, ask whether there is a notion of ``good'' model for $E$
at these bad primes.  To quote [BLR, page 1], ``It came as a
surprise for arithmeticians and algebraic geometers when
A.~N\'eron, relaxing the condition of properness and concentrating
on the group structure and the smoothness, discovered in the years
1961--1963 that such models exist in a canonical way.''

Before formally defining N\'eron models, we describe what it means
for a morphism $f:X\to Y$ of schemes to be smooth.  A morphism
$f:X\to Y$ is finite type if for every open affine
$U=\Spec(R)\subset Y$ there is a finite covering of $f^{-1}(U)$ by
open affines $\Spec(S)$, such that each $S$ is a finitely
generated $R$-algebra.
\begin{definition} A morphism $f:X\to Y$ is {\em smooth at
$x\in X$} if it is of finite type and there are open affine
neighborhoods $\Spec(A)\subset X$ of $x$ and $\Spec(R)\subset Y$
of $f(x)$ such that
\[
  A \isom R[t_1,\ldots, t_{n+r}]/(f_1,\ldots, f_n)
\]
for elements $f_1,\ldots, f_n\in R[t_1,\ldots, t_{n+r}]$ and all
$n\times n$ minors of the Jacobian matrix $(\partial f_i/ \partial
t_j)$ generate the unit ideal of $A$.  The morphism $f$ is {\em
\'etale} at~$x$ if, in addition, $r=0$.  A morphism is {\em smooth
of relative dimension~$d$} if it is smooth at~$x$ for every $x\in
X$ and $r=d$ in the isomorphism above.
\end{definition}

Smooth morphisms behave well.  For example, if $f$ and $g$ are
smooth and $f\circ g$ is defined, then $f\circ g$ is automatically
smooth.  Also, smooth morphisms are closed under base extension:
if $f:X\to Y$ is a smooth morphism over~$S$, and $S'$ is a scheme
over~$S$, then the induced map $X\times_S S' \to Y\times_S S'$ is
smooth.   (If you've never seen products of schemes, it might be
helpful to know that $\Spec(A)\times\Spec(B) = \Spec(A\tensor B)$.
Read \cite[\S{}II.3]{hartshorne} for more information about fiber
products, which provide a geometric way to think about tensor
products.  Also, we often write $X_{S'}$ as shorthand for
$X\times_S S'$.)

We are now ready for the definition. Suppose $R$ is a Dedekind
domain with field of fractions~$K$ (e.g., $R=\Z$ and $K=\Q$).
\begin{definition}[N\'eron model]
Let~$A$ be an abelian variety over~$K$.  The {\em N\'eron
model}~$\cA$ of~$A$ is a smooth commutative group scheme over~$R$
such that for any smooth morphism $S\to R$ the natural map of
abelian groups
\[
  \Hom_R(S,\cA) \to \Hom_K(S\times_R K, A)
\]
is a bijection.  This is called the N\'eron mapping property: In
more compact notation, it says that there is an isomorphism
$\cA(S) \isom A(S_K)$.
\end{definition}
Taking $S=\cA$ in the definition we see that $\cA$ is unique, up
to a unique isomorphism.

It is a deep theorem that N\'eron models exist. Fortunately,
Bosch, L\"utkebohmert, and Raynaud devoted much time to create a
carefully written book \cite{neronmodels} that explains the
construction in modern language.  Also, in the case of elliptic
curves, Silverman's second book \cite{silverman:aec2} is extremely
helpful.

The basic idea of the construction is to first observe that if we
can construct a N\'eron model at each localization
$R_{\mathfrak{p}}$ at a nonzero prime ideal of~$R$, then each of
these local models can be glued to obtain a global N\'eron model
(this uses that there are only finitely many primes of bad
reduction).  Thus we may assume that $R$ is a discrete valuation
ring.

The next step is to pass to the ``strict henselization'' $R'$ of
$R$.   A local ring $R$ with maximal ideal~$\wp$ is henselian if
``every simple root lifts uniquely''; more precisely, if whenever
$f(x)\in R[x]$ and $\alpha\in R$ is such that $f(\alpha)\con
0\pmod{\wp}$ and $f'(\alpha)\not\con0\pmod{\wp}$, there is a
unique element $\tilde{\alpha}\in R$ such that $\tilde{\alpha}\con
\alpha\pmod{\wp}$ and $f(\tilde{\alpha})=0$. The strict
henselization of a discrete valuation ring~$R$ is an extension of
$R$ that is henselian and for which the residue field of $R'$ is
the separable closure of the residue field of $R$ (when the
residue field is finite, the separable close is just the algebraic
closure).  The strict henselization is not too much bigger than
$R$, though it is typically not finitely generated over~$R$.  It
is, however, much smaller than the completion of~$R$ (e.g., $\Z_p$
is uncountable).  The main geometric property of a strictly
henselian ring~$R$ with residue field~$k$ is that if $X$ is a
smooth scheme over~$R$, then the reduction map $X(R)\to X(k)$ is
surjective.

Working over the strict henselization, we first resolve
singularities.  Then we use a generalization of the theorem that
Weil used to construct Jacobians to pass from a birational group
law to an actual group law.  We thus obtain the N\'eron model over
the strict henselization of~$R$.  Finally, we use Grothendieck's
faithfully flat descent to obtain a N\'eron model over $R$.

When $A$ is the Jacobian of a curve~$X$, there is an alternative
approach that involves the ``minimal proper regular model''
of~$X$. For example, when~$A$ is an elliptic curve, it is the
Jacobian of itself, and the N\'eron model can be constructed in
terms of the minimal proper regular model~$\cX$ of $A$ as follows.
In general, the model $\cX\to R$ is not also smooth. Let $\cX'$ be
the smooth locus of $\cX\to R$, which is obtained by removing from
each closed fiber $\cX_{\Fp}=\sum n_i C_i$ all irreducible
components with multiplicity $n_i\geq 2$ and all singular points
on each $C_i$, and all points where at least two $C_i$ intersect
each other. Then the group structure on~$A$ extends to a group
structure on $\cX'$, and $\cX'$ equipped with this group structure
is the N\'eron model of~$A$.

Explicit determination of the possibilities for the minimal proper
regular model of an elliptic curve was carried out by Kodaira,
then N\'eron, and finally in a very explicit form by Tate.  Tate
codified a way to find the model in what's called ``Tate's
Algorithm'' (see Antwerp IV, which is available on my web page:
{\tt http://modular.fas.harvard.edu/scans/antwerp/}, and look at
Silverman, chapter IV, which also has important implementation
advice).


\subsection{The Birch and Swinnerton-Dyer conjecture and N\'eron models}
Throughout this section, let $A$ be an abelian variety over~$\Q$
and let $\cA$ be the corresponding N\'eron model over~$\Z$.  We
work over $\Q$ for simplicity, but could work over any number
field.

Let $L(A,s)$ be the Hasse-Weil $L$-function of~$A$ (see Section
[to be written]\edit{Add reference.}). Let $r=\ord_{s=1} L(A,s)$
be the analytic rank of~$A$.  The Birch and Swinnerton-Dyer
Conjecture asserts that $A(\Q)\ncisom \Z^r\oplus A(\Q)_{\tor}$ and
\[
  \frac{L^{(r)}(A,1)}{r!} = \frac{\left(\prod c_p\right)\cdot
  \Omega_A\cdot \Reg_A\!\cdot\, \#\Sha(A)}{\#A(\Q)_{\tor}\cdot
  \#A^{\vee}(\Q)_{\tor}}.
\]
We have not defined most of the quantities appearing in this
formula.  In this section, we will define the Tamagawa numbers
$c_p$, the real volume $\Omega_A$, and the Shafarevich-Tate group
$\Sha(A)$ in terms of the N\'eron model $\cA$ of $A$.

We first define the Tamagawa numbers $c_p$, which are the orders
groups of connected components.  Let $p$ be a prime and consider
the closed fiber $\cA_{\F_p}$, which is a smooth commutative group
scheme over $\F_p$.  Then $\cA_{\F_p}$ is a disjoint union of one
or more connected components.  The connected component
$\cA_{\F_p}^0$ that contains the identity element is a subgroup of
$\cA_{\F_p}$ (Intuition: the group law is continuous and the
continuous image of a connected set is connected, so the group
structure restricts to $\cA_{\F_p}^0$).

\begin{definition}[Component Group]
The {\em component group} of~$A$ at~$p$ is
\[
\Phi_{A,p} = \cA_{\F_p} / \cA_{\F_p}^0.
\]
\end{definition}
{\bf Fact:} The component group $\Phi_{A,p}$ is a finite flat
group scheme over~$\F_p$, and\edit{Reference?} for all but
finitely many primes~$p$, we have $\Phi_{A,p}=0$.

\begin{definition}[Tamagawa Numbers]
The {\em Tamagawa number} of $A$ at a prime $p$ is
$$c_p = \#\Phi_{A,p}(\F_p).$$
\end{definition}

Next we define the real volume $\Omega_A$.  Choose a basis
\[\omega_1,\ldots,\omega_d \in \H^0(\cA,\Omega_{\cA/\Z}^1)\]
for the global differential $1$-forms on $\cA$, where $d=\dim A$.
The wedge product $w =
\omega_1\wedge\omega_2\wedge\cdots\wedge\omega_d$ is a global
$d$-form on $\cA$.  Then $w$ induces a differential $d$-form on
the real Lie group $A(\R)$.
\begin{definition}[Real Volume]
The {\em real volume} of $A$ is
\[\Omega_A = \left| \int_{A(\R)} w\right|\in\R_{>0}.\]
\end{definition}

Finally, we give a definition of the Shafarevich-Tate group in
terms of the N\'eron model.  Let $\cA_0$ be the scheme obtained
from the N\'eron model $\cA$ over $A$ by removing from each closed
fiber all nonidentity components. Then $\cA_0$ is again a smooth
commutative group scheme, but it need not have the N\'eron mapping
property.

Recall that an \'etale morphism is a morphism that is smooth of
relative dimension~$0$.  A sheaf of abelian groups on the \'etale
site $\Z_{\et}$ is a functor (satisfying certain axioms) from the
category of \'etale morphism $X\to \Z$ to the category of abelian
groups.  There are enough sheaves on $\Z_{\et}$ so that there is a
cohomology theory for such sheaves, which is called \'etale
cohomology. In particular if $\cF$ is a sheaf on $\Z_{\et}$, then
for every integer~$q$ there is an abelian group
$\H^q(\Z_{\et},\cF)$ associated to $\cF$ that has the standard
properties of a cohomology functor.

The group schemes $\cA_0$ and $\cA$ both determine sheaves on the
\'etale site, which we will also denote by $\cA_0$ and $\cA$.

\begin{definition}[Shafarevich-Tate Group]
Suppose $A(\R)$ is connected, i.e., that $\cA_0=\cA$.  Then the {\em
Shafarevich-Tate} group of $A$ is $\H^1(\Z_{\et},\cA)$.  More
generally, suppose only that $A(\R)$ is connected.  Then the
Shafarevich-Tate group is the image of the natural map
\[
  f:\H^1(\Z_{\et}, \cA_0) \to \H^1(\Z_{\et},\cA).
\]
Even more generally, if $A(\R)$ is not connected, then there is a
natural map $r:\H^1(\Z_{\et},\cA)\to \H^1(\Gal(\C/\R),A(\C))$ and
$\Sha(A)=\im(f)\meet \ker(r)$.
\end{definition}

Mazur proves in the appendix to \cite{mazur:tower} that this
definition is equivalent to the usual Galois cohomology
definition.  To do this, he considers the exact sequence $0\to
\cA_0 \to \cA \to \Phi_A \to 0$, where $\Phi_A$ is a sheaf version
of $\oplus_{p} \Phi_{A,p}$. The main input is Lang's Theorem,
which implies that over a local field, unramified Galois
cohomology is the same as the cohomology of the corresponding
component group.\edit{Reference for Lang's Lemma, etc.}

\begin{conjecture}[Shafarevich-Tate]
The group $\H^1(\Z_{\et},\cA)$ is finite.
\end{conjecture}

When $A$ has rank~$0$, all component groups $\Phi_{A,p}$ are
trivial, $A(\R)$ is connected, and $A(\Q)_{\tor}$ and
$A^{\vee}(\Q)_{\tor}$ are trivial, the Birch and Swinnerton-Dyer
conjecture takes the simple form
\[
  \frac{L(A,1)}{\Omega_A}  = \#\H^1(\Z_{\et},\cA).
\]
Later\edit{Where?}, when $A$ is modular, we will (almost)
interpret $L(A,1)/\Omega_A$ as the order of a certain group that
involves modular symbols.   Thus the BSD conjecture asserts that
two groups have the same order; however, they are not isomorphic,
since, e.g., when $\dim A=1$ the modular symbols group is always
cyclic, but the Shafarevich-Tate group is never cyclic (unless it
is trivial).


\subsection{Functorial properties of Neron models}
The definition of N\'eron model is functorial, so one might expect
the formation of N\'eron models to have good functorial
properties.  Unfortunately, it doesn't.

\begin{proposition}
Let $A$ and $B$ be abelian varieties.  If $\cA$ and $\cB$ are the
N\'eron models of $A$ and $B$, respectively, then the N\'eron
model of $A\times B$ is $\cA\times \cB$.
\end{proposition}

Suppose $R\subset R'$ is a finite extension of discrete valuation
rings with fields of fractions $K\subset K'$.  Sometimes, given an
abelian variety~$A$ over a field~$K$, it is easier to understand
properties of the abelian variety, such as reduction, over $K'$.
For example, you might have extra information that implies that
$A_{K'}$ decomposes as a product of well-understood abelian
varieties.  It would thus be useful if the N\'eron model of
$A_{K'}$ were simply the base extension $\cA_{R'}$ of the N\'eron
model of $A$ over~$R$. This is, however, frequently not the case.

Distinguishing various types of ramification will be useful in
explaining how N\'eron models behave with respect to base change,
so we now recall the notions of tame and wild ramification. If
$\pi$ generates the maximal ideal of $R$ and $v'$ is the valuation
on~$R'$, then the extension is {\em unramified} if $v'(\pi)=1$. It
is {\em tamely ramified} if $v'(\pi)$ is not divisible by the
residue characteristic of $R$, and it is {\em wildly ramified} if
$v'(\pi)$ is divisible by the residue characteristic of~$R$.  For
example, the extension $\Q_p(p^{1/p})$ of $\Q_p$ is wildly
ramified.

\begin{example}If $R$ is the ring of integers of a $p$-adic field, then for
every integer~$n$ there is a unique unramified extension of $R$ of
degree~$n$.  See \cite[\S{}I.7]{cassels-frohlich}, where
Fr\"ohlich uses Hensel's lemma to show that the unramified
extensions of $K=\Frac(R)$ are in bijection with the finite
(separable) extensions of the residue class field.
\end{example}

The N\'eron model does not behave well with respect to base
change, except in some special cases.  For example, suppose $A$ is
an abelian variety over the field of fractions~$K$ of a discrete
valuation ring~$R$.  If $K'$ is the field of fractions of a finite
unramified extension $R'$ of $R$, then the N\'eron model of
$A_{K'}$ is $\cA_{R'}$, where $\cA$ is the N\'eron model of $A$
over $R$.  Thus the N\'eron model over an unramified extension is
obtained by base extending the N\'eron model over the base.  This
is not too surprising because in the construction of N\'eron model
we first passed to the strict henselization of~$R$, which is a
limit of unramified extensions.

Continuing with the above notation, if $K'$ is tamely ramified
over~$K$, then in general $\cA_{R'}$ need {\em not} be the N\'eron
model of $A_{K'}$.  Assume that $K'$ is Galois over~$K$.  In
\cite{edixhoven:tame}, Bas Edixhoven describes the N\'eron model
of $A_K$ in terms of $\cA_{R'}$.  To describe his main theorem, we
introduce the restriction of scalars of a scheme.

\begin{definition}[Restriction of Scalars]
Let $S'\to S$ be a morphism of schemes and let $X'$ be a scheme
over $S'$.  Consider the functor $$\mathcal{R}(T) =
\Hom_{S'}(T\times_S S', X')$$ on the category of all schemes~$T$
over~$S$. If this functor is representable, the representing
object~$X=\Res_{S'/S}(X')$ is called the {\em restriction of
scalars} of $X'$ to $S$.
\end{definition}
Edixhoven's main theorem is that if~$G$ is the Galois group of
$K'$ over~$K$ and $X=\Res_{R'/R}(\cA_{R'})$ is the restriction of
scalars of $\cA_{R'}$ down to~$R$, then there is a natural map
$\cA\to X$ whose image is the closed subscheme $X^G$ of fixed
elements.

\comment{
\begin{example}
Suppose~$E$ is an elliptic curves over a number field $K$, and
that~$E$ has everywhere good reduction (i.e., the N\'eron model
of~$E$ is proper).  The restriction of scalars $A=\Res_{K/\Q}(E)$
is an abelian variety over~$\Q$ of dimension $[K:\Q]$.  Admitting
Raynaud's famous theorem that there are no abelian schemes
over~$\Z$ (which is an analogue of the fact that there are no
unramified field extensions of~$\Q$), we automatically know
that~$A$ must have bad reduction at some prime~$p$.  First
suppose~$p$ does not ramify in $K$ over $\Q$.  Because the
formation of N\'eron models commutes with unramified base
extension,
\end{example}
}

We finish this section with some cautious remarks about exactness
properties of N\'eron models. If $0\to A\to B\to C\to 0$ is an
exact sequence of abelian varieties, then the functorial
definition of N\'eron models produces a complex of N\'eron models
\[
  0 \to \cA \to \cB \to \cC \to 0,
\]
where $\cA$, $\cB$, and $\cC$ are the N\'eron models of $A$, $B$,
and $C$, respectively.  This complex can fail to be exact at every
point.  For an in-depth discussion of conditions when we have
exactness, along with examples that violate exactness, see
\cite[Ch.~7]{neronmodels}, which says: ``we will see that, except
for quite special cases, there will be a defect of exactness, the
defect of right exactness being much more serious than the one of
left exactness.''

To give examples in which right exactness fails, it suffices to
give an optimal quotient $B\to C$ such that for some~$p$ the
induced map $\Phi_{B,p}\to \Phi_{C,p}$ on component groups is not
surjective (recall that optimal means $A=\ker(B\to C)$ is an
abelian variety). Such quotients, with $B$ and $C$ modular, arise
naturally in the context of Ribet's level optimization.  For
example, the elliptic curve $E$ given by $y^2 + xy = x^3 + x^2 -
11x$ is the optimal new quotient of the Jacobian $J_0(33)$ of
$X_0(33)$. The component group of $E$ at~$3$ has order~$6$, since
$E$ has semistable reduction at $3$ (since $3\mid\mid 33$) and
$\ord_3(j(E)) = -6$. The image of the component group of $J_0(33)$
in the component group of~$E$ has order~$2$:
\begin{verbatim}
> OrderOfImageOfComponentGroupOfJ0N(ModularSymbols("33A"),3);
2
\end{verbatim}
Note that the modular form associated to $E$ is congruent
modulo~$3$ to the form corresponding to $J_0(11)$, which
illustrates the connection with level optimization.

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "main"
%%% End: 
\chapter{Abelian Varieties Attached to Modular Forms}

In this chapter we describe how to decompose $J_1(N)$, up to
isogeny, as a product of abelian subvarieties $A_f$ corresponding
to Galois conjugacy classes of cusp forms~$f$ of weight~$2$.  This
was first accomplished by Shimura (see \cite[Theorem
7.14]{shimura:intro}). We also discuss properties of the Galois
representation attached to~$f$. \edit{Rewrite intro after chapter
is done, and point to where each thing is done.}

In this chapter we will work almost exclusively with $J_1(N)$.  However,
everything goes through exactly as below with $J_1(N)$ replaced by
$J_0(N)$ and $S_2(\Gamma_1(N))$ replaced by $S_2(\Gamma_0(N))$.
Since,  $J_1(N)$ has dimension much larger
than $J_0(N)$, so for computational investigations it
is frequently better to work with $J_0(N)$.

See Brian Conrad's appendix to [ribet-stein: Lectures on Serre's
Conjectures] for a much more extensive exposition of the
construction discussed below, which is geared toward preparing the
reader for Deligne's more general construction of Galois
representations associated to newforms of weight $k\geq 2$ (for
that, see Conrad's book ...).

\section{Decomposition of the Hecke algebra}
Let~$N$ be a positive integer and let
\[
   \T=\Z[\ldots, T_n, \ldots]\subset\End(J_1(N))
\]
be the algebra of all Hecke operators acting on $J_1(N)$. Recall
from Section~\ref{sec:decomp_anemic} that the anemic Hecke algebra
is the subalgebra
\[
  \T_0=\Z[\ldots,T_n,\ldots:(n,N)=1]\subset\T
\]
of~$\T$ obtained by adjoining to~$\Z$ only those Hecke operators
$T_n$ with~$n$ relatively prime to~$N$.

\begin{remark}
Viewed as $\Z$-modules, $\T_0$ need not be saturated in $\T$,
i.e., $\T/\T_0$ need not be torsion free.  For example, if $\T$ is
the Hecke algebra associated to $S_2(\Gamma_1(24))$ then
$\T/\T_0\isom \Z/2\Z$.  Also, if $\T$ is the Hecke algebra
associated to $S_2(\Gamma_0(54))$, then $\T/\T_0\isom \Z/3\Z\times
\Z$. \edit{I'm including the MAGMA scripts I used to check this
as comments in the latex source, until I find the right way to
justify these computational remarks.  Maybe the remarks should point to an appendix
where they are all justified?}

\comment{
function idx(N)
   J := J0(N,2,+1);
   T := HeckeAlgebra(J);
   T0 := [HeckeOperator(J,n) : n in [1..30] | GCD(n,Level(J)) eq 1];
   T0 := Subgroup(T0);
   return Invariants(Quotient(T,T0));
end function;

stop := 50;
function idx1(N)
    J := J1(N,2,+1);
    T := Subgroup([HeckeOperator(J,n) : n in [1..stop]]);
    T0 := [HeckeOperator(J,n) : n in [1..stop] | GCD(n,Level(J)) eq 1];
    T0 := Subgroup(T0);
    return Invariants(Quotient(T,T0));
end function;
}
\end{remark}
If $f=\sum a_n q^n$ is a newform, then the field
$K_f=\Q(a_1,a_2,\ldots)$ has finite degree over~$\Q$, since
the~$a_n$ are the eigenvalues of a family of commuting operators
with integral characteristic polynomials. The {\em Galois
conjugates} of~$f$ are the newforms $\sigma(f) = \sum \sigma(a_n)
q^n$, for $\sigma\in\GalQ$. There are $[K_f:\Q]$ Galois conjugates
of~$f$.

As in Section~\ref{sec:decomp_anemic}, we have a canonical
decomposition
\begin{equation}\label{eqn:anemic_prod}
   \T_0\tensor\Q \isom \prod_f K_f,
\end{equation}
where~$f$ varies over a set of representatives for the Galois
conjugacy classes of newforms in $S_2(\Gamma_1(N))$ of level
dividing~$N$.  For each~$f$, let
$$\pi_f=(0,\ldots,0,1,0,\ldots,0)\in\prod K_f$$ be projection onto the
factor $K_f$ of the product (\ref{eqn:anemic_prod}). Since
$\T_0\subset\T$, and~$\T$ has no additive torsion, we have
$\T_0\tensor\Q \subset \T\tensor\Q$, so these projectors $\pi_f$
lie in $\T_\Q=\T\tensor\Q$. Since $\T_\Q$ is commutative and the
$\pi_f$ are mutually orthogonal idempotents whose sum is
$(1,1,\ldots,1)$, we see that $\T_\Q$ breaks up as a product of
algebras
\[
  \T_\Q \isom \prod_f L_f, \qquad{}t\mapsto\sum_f t\pi_f.
\]

\subsection{The Dimension of the algebras $L_f$}
\begin{proposition}\label{prop:dim_lf_kf}
If $f$, $L_f$ and $K_f$ are as above, then $\dim_{K_f} L_f$ is the
number of divisors of $N/N_f$ where $N_f$ is the level of the
newform~$f$.
\end{proposition}
\begin{proof}
Let $V_f$ be the complex vector space spanned by all images of
Galois conjugates of~$f$ via all maps $\alpha_d$ with $d\mid
N/N_f$. It follows from [Atkin-Lehner-Li theory -- multiplicity
one]\edit{fill in} that the images via $\alpha_d$ of the Galois
conjugates of~$f$ are linearly independent. (Details: More
generally, if $f$ and $g$ are newforms of level~$M$, then by
Proposition~\ref{prop:alpha_indep}, $B(f) = \{\alpha_{d}(f) \,:\,
d \mid N/N_f\}$ is a linearly independent set and likewise for
$B(g)$.  Suppose some nonzero element $f'$ of the span of $B(f)$
equals some element $g'$ of the span of $B(g)$.  Since $T_p$, for
$p\nmid N$, commutes with $\alpha_d$, we have $T_p(f')=a_p(f) f'$
and $T_p(g')=a_p(g)g'$, so $0=T_p(0)=T_p(f'-g') =
a_p(f)f'-a_p(g)g'$. Since $f'=g'$, this implies that
$a_p(f)=a_p(g)$.  Because a newform is determined by the
eigenvalues of $T_p$ for $p\nmid N$, it follows that $f=g$.) Thus
the $\C$-dimension of $V_f$ is the number of divisors of $N/N_f$
times $\dim_{\Q} K_f$.

The factor $L_f$ is isomorphic to the image of $\T_\Q\subset
\End(S_k(\Gamma_1(N)))$ in $\End(V_f)$.  As in Section~\ref{},
there is a single element $v\in V_f$ so that $V_f = \T_\C \cdot
v$. Thus the image of $\T_\Q$ in $\End(V_f)$ has dimension
$\dim_\C V_f$, and the result follows.
\end{proof}

Let's examine a particular case of this proposition. Suppose~$p$ is a
prime and~$f=\sum a_n q^n$ is a newform of level $N_f$ coprime to~$p$,
and let $N=p\cdot N_f$.  We will show that
\begin{equation}\label{eqn:Lf_present}
  L_f=K_f[U]/(U^2-a_p{}U+p),
\end{equation}
hence $\dim_{K_f} L_f=2$ which, as expected, is the number of divisors
of $N/N_f=p$. The first step is to view $L_f$ as the space of
operators generated by the Hecke operators $T_n$ acting on the span~$V$ of
the images $f(dz)=f(q^d)$ for $d\mid (N/N_f)=p$.  If $n\neq{}p$, then $T_n$
acts on~$V$ as the scalar $a_n$, and when $n=p$, the Hecke
operator $T_p$ acts on $S_k(\Gamma_1(p\cdot N_f))$ as the operator
also denoted $U_p$.  By Section~\ref{sec:up_explicit}, we know that
$U_p$ corresponds to the matrix $\smallmtwo{a_p}{1}{-p}{0}$ with
respect to the basis $f(q), f(q^p)$ of~$V$. Thus $U_p$ satisfies the relation
$U_p^2-a_pU+p$.  Since $U_p$ is not a scalar matrix, this minimal polynomial
of~$U_p$ is quadratic, which proves (\ref{eqn:Lf_present}).

More generally, see \cite[Lem.~4.4]{ddt}
(Diamond-Darmon-Taylor)\edit{Remove parens.} for an explicit
presentation of $L_f$ as a quotient
$$L_f \isom K_f[\ldots,U_p,\ldots]/I$$
where $I$ is an ideal and the $U_p$ correspond to the prime divisors
of $N/N_f$.

\section{Decomposition of $J_1(N)$}

Let~$f$ be a newform in $S_2(\Gamma_1(N))$ of level a divisor~$M$
of~$N$, so $f\in S_2(\Gamma_1(M))_{\new}$ is a normalized
eigenform for all the Hecke operators of level~$M$. We associate
to~$f$ an abelian subvariety $A_f$ of $J_1(N)$, of dimension
$[L_f:\Q]$, as follows. Recall that $\pi_f$ is the $f$th projector
in $\T_0\tensor\Q=\prod_g K_g$.  We can not define $A_f$ to be the
image of $J_1(N)$ under $\pi_f$, since $\pi_f$ is only, a priori,
an element of $\End(J_1(N))\tensor\Q$.  Fortunately, there exists
a positive integer~$n$ such that $n\pi_f\in\End(J_1(N))$, and we
let $$A_f=n\pi_f(J_1(N)).$$ This is independent of the choice
of~$n$, since the choices for~$n$ are all multiples of the
``denominator'' $n_0$ of $\pi_f$, and if~$A$ is any abelian
variety and~$n$ is a positive integer, then $nA = A$.

%Since $A_f$ is only defined up to isogeny, it is natural
%to consider the category of abelian varieties up
%to isogeny: the objects are abelian varieties
%and the morphisms are isogenies over $\Q$.

The natural map $\prod_f A_f\into J_1(N)$, which is  induced by
summing the inclusion maps, is an isogeny.  Also $A_f$ is simple
if $f$ is of level~$N$, and otherwise $A_f$ is isogenous to a
power of $A_f'\subset J_1(N_f)$.  Thus we obtain an isogeny
decomposition of $J_1(N)$ as a product of $\Q$-simple abelian
varieties.

\begin{remark}
The abelian varieties $A_f$ frequently decompose further
over~$\Qbar$, i.e., they are not absolutely simple, and it is an
interesting problem to determine an isogeny decomposition of
$J_1(N)_{\Qbar}$ as a product of simple abelian varieties.  It is
still not known precisely how to do this computationally for any
particular~$N$.  \edit{Add more/pointers/etc.}
\end{remark}

This decomposition can be viewed in another way over the complex
numbers. As a complex torus, $J_1(N)(\C)$ has the following model:
\[
  J_1(N)(\C)=\Hom(S_2(\Gamma_1(N)),\C)/H_1(X_1(N),\Z).
\]
The action of the Hecke algebra~$\T$ on $J_1(N)(\C)$ is compatible with its
action on the cotangent space $S_2(\Gamma_1(N))$. This
construction presents $J_1(N)(\C)$ naturally as $V/\cL$ with~$V$ a
complex vector space and~$\cL$ a lattice in~$V$. The anemic Hecke
algebra~$\T_0$ then decomposes~$V$ as a direct sum $V=\bigoplus_f
V_f$. The Hecke operators act on $V_f$ and $\cL$ in a compatible
way, so $\T_0$ decomposes $\cL\tensor\Q$ in a compatible way.
Thus $\cL_f = V_f\intersect\cL$ is a lattice in $V_f$, so we may
$A_f(\C)$ view as the complex torus $V_f / \cL_f$.

\begin{lemma}
Let~$f\in S_2(\Gamma_1(N))$ be a newform of level dividing~$N$ 
and $A_f = n\pi_f(J_1(N))$ be the corresponding abelian subvariety
of $J_1(N)$.  Then the Hecke algebra $\T\subset \End(J_1(N))$
leaves $A_f$ invariant.
\end{lemma}
\begin{proof}
The Hecke algebra $\T$ is commutative, so if $t\in \T$, then
$$t A_f = tn\pi_f(J_1(N)) = n\pi_f(tJ_1(N))\subset n\pi_f(J_1(N)) = A_f.$$
\end{proof}

\begin{remark}
Viewing $A_f(\C)$ as $V_f/\cL_f$ is extremely useful computationally,
since $\cL$ can be computed using modular symbols, and $\cL_f$ can
be cut out using the Hecke operators.  For example, if $f$ and $g$
are nonconjugate newforms of level dividing~$N$, we can explicitly compute the
group structure of $A_f\cap A_g\subset J_1(N)$ by doing a computation
with modular symbols in $\cL$.  More precisely, we have
\[
  A_f \cap A_g \isom (\cL/(\cL_f + \cL_g))_{\tor}.
\]
\end{remark}

Note that $A_f$ depends on viewing~$f$ as an element of
$S_2(\Gamma_1(N))$ for some~$N$.  Thus it would be more accurate
to denote $A_f$ by $A_{f,N}$, where~$N$ is any multiple of the
level of~$f$, and to reserve the notation $A_f$ for the case
$N=1$.  Then $\dim A_{f,N}$ is $\dim A_f$ times the number of
divisors of $N/N_f$.

\subsection{Aside: intersections and congruences}\label{sec:int_cong}
Suppose~$f$ and~$g$ are not Galois conjugate.  Then the
intersection $\Psi=A_f\intersect{}A_g$ is finite, since $V_f\meet
V_g = 0$, and the integer $\#\Psi$ is of interest.  This
cardinality is related to congruence between~$f$ and~$g$, but the
exact relation is unclear.   For example, one might expect that
$p\mid \#\Psi$ if and only if there is a prime $\wp$ of the
compositum  $K_f.K_g$ of residue characteristic~$p$ such that
$a_q(f) \con a_q(g)\pmod{\wp}$ for all $q\nmid N$.   If $p\mid
\#\Psi$, then such a prime~$\wp$ exists (take $\wp$ to be induced
by a maximal ideal in the support of the nonzero $\T$-module
$\Psi[p]$). The converse is frequently true, but is sometimes
false. For example, if~$N$ is the prime $431$ and
\begin{align*}
f&=q - q^2 + q^3 - q^4 + q^5 - q^6 - 2q^7 + \cdots\\
g&=q - q^2 + 3q^3 - q^4 - 3q^5 - 3q^6 + 2q^7 + \cdots,
\end{align*}
then $f\con g\pmod{2}$, but $A_f\meet A_g = 0$.
\comment{
> J := J0(431);D := DC(J); D[1] meet D[2];
{ 0 }: finitely generated subgroup of abelian variety with invariants []
Modular abelian variety of dimension 0 and level 431 over Q
> Newform(D[1]) - Newform(D[2]);
-2*q^3 + 4*q^5 + 2*q^6 - 4*q^7 + O(q^8)

This computation was in J0, but it implies that the curves also don't
intersection in J1 because the Shimura subgroup has odd order equal
to the num of (431-1)/12.
}
This example implies that ``multiplicity one fails'' for level $431$
and $p=2$, so the Hecke algebra associated to $J_0(431)$ is not
Gorenstein (see
[Lloyd Kilford paper]\edit{fix reference} for more details).


\section{Galois representations attached to $A_f$}
It is important to emphasize the case when~$f$ is a newform of
level~$N$, since then $A_f$ is $\Q$-simple\edit{add pointer to
where this is proved.} and there is a compatible family of
$2$-dimensional $\ell$-adic representations attached to~$f$, which
arise from torsion points on $A_f$.

Proposition~\ref{prop:dim_lf_kf} implies
that $L_f=K_f$. Fix such an~$f$, let $A=A_f$, let $K=K_f$, and let
\[
  d=\dim A=\dim_{\Q} K=[K:\Q].
\]
Let $\ell$ be a prime and consider the $\Ql$-adic Tate module
$\Tate_{\ell}(A)$  of~$A$:
\[
\Tate_{\ell}(A)=\Ql\tensor \varprojlim_{\nu>0} A[\ell^{\nu}].
\]
Note that as a $\Ql$-vector space $\Tate_{\ell}(A)\isom\Ql^{2d}$,
since $A[n]\isom (\Z/n\Z)^{2d}$, as groups.

There is a natural action of the ring  $K\tensor_{\Q}\Ql$ on
$\Tate_{\ell}(A)$.  By algebraic number theory
\[
  K\tensor_{\Q}\Ql = \prod_{\lambda\mid\ell} K_{\lambda},
\]
where~$\lambda$ runs through the primes of the ring $\O_K$ of
integers of~$K$ lying over~$\ell$ and $K_\lambda$ denotes the
completion of $K$ with respect to the absolute value induced
by~$\lambda$. Thus $\Tate_{\ell}(A)$ decomposes as a product
\[
  \Tate_{\ell}(A)=\prod_{\lambda\mid \ell}\Tate_{\lambda}(A)
\]
where $\Tate_{\lambda}(A)$ is a $K_{\lambda}$ vector space.
\begin{lemma}\label{lem:dimtate}
Let the notation be as above. Then for all~$\lambda$ lying
over~$\ell$,
\[
  \dim_{K_{\lambda}} \Tate_{\lambda}(A) = 2.
\]
\end{lemma}
\begin{proof}
Write $A=V/\cL$, with $V=V_f$ a complex vector space and $\cL$ a
lattice.  Then $\Tate_{\lambda}(A) \isom  \cL\tensor\Ql$ as
$K_\lambda$-modules (not as $\GalQ$-modules!), since
$A[\ell^n]\isom \cL/\ell^n\cL$, and $\varprojlim_{n}
\cL/\ell^n\cL\isom \Zl\tensor\cL$.  Also, $\cL\tensor\Q$ is a
vector space over $K$, which must have dimension~$2$, since
$\cL\tensor\Q$ has dimension $2d =2\dim A$ and~$K$ has degree~$d$.
Thus
\[
 \Tate_\lambda(A) \isom \cL\tensor K_\lambda \ncisom
        (K \oplus{} K) \tensor_K K_{\lambda}
        \isom K_{\lambda} \oplus K_{\lambda}
\]
has dimension~$2$ over $K_{\lambda}$.
\end{proof}

Now consider $\Tate_{\lambda}(A)$, which is a $K_{\lambda}$-vector
space of dimension $2$. The Hecke operators are defined over~$\Q$,
so $\GalQ$ acts on $\Tate_{\ell}(A)$ in a way compatible with the
action of $K\tensor_{\Q}\Q_{\ell}$. We thus obtain a homomorphism
\[
 \rho_{\ell}=\rho_{f,\ell}:\GalQ\to\Aut_{K\tensor\Q_{\ell}}\Tate_{\ell}(A)
             \ncisom \GL_2(K\tensor\Q_{\ell})
             \isom \prod_{\lambda}\GL_2(K_{\lambda}).
\]
Thus $\rho_{\ell}$ is the direct sum of $\ell$-adic Galois
representations $\rho_{\lambda}$ where
\[
 \rho_{\lambda}:\GalQ\to\End_{K_{\lambda}}(\Tate_{\lambda}(A))
\]
gives the action of $\GalQ$ on $\Tate_{\lambda}(A)$.

If $p\nd \ell{}N$, then $\rho_{\lambda}$ is unramified at~$p$ (see
\cite[Thm.~1]{serre-tate}). In this case it makes sense to
consider $\rho_{\lambda}(\varphi_p)$, where $\varphi_p\in\GalQ$ is
a Frobenius element at~$p$. Then $\rho_{\lambda}(\varphi_p)$ has a
well-defined trace and determinant, or equivalently, a well-defined
characteristic polynomial $\Phi(X) \in K_{\lambda}[X]$.
\begin{theorem}\label{thm:shimura_rep}
Let $f\in S_2(\Gamma_1(N),\eps)$ be a newform of level~$N$ with
Dirichlet character~$\eps$. Suppose $p\nd\ell{}N$, and let
$\varphi_p\in\GalQ$ be a Frobenius element at~$p$.  Let $\Phi(X)$
be the characteristic polynomial of $\rho_{\lambda}(\varphi_p)$.
Then
\[
   \Phi(X)=X^2 - a_p X + p\cdot \eps(p),
\]
where $a_p$ is the $p$th coefficient of the modular form~$f$ (thus
$a_p$ is the image of $T_p$ in $E_f$ and $\eps(p)$ is the image
of $\dbd{p}$).
\end{theorem}

Let $\vphi=\vphi_p$.  By the Cayley-Hamilton theorem
\[
\rho_{\lambda}(\varphi)^2
  -\tr(\rho_{\lambda}(\varphi))\rho_{\lambda}(\varphi)
  +\det(\rho_{\lambda}(\varphi))=0.
\]
Using the Eichler-Shimura
congruence relation (see \edit{Next week!}) we will show that
$\tr(\rho_{\lambda}(\varphi))=a_p$, but we defer the proof of
this until ...\edit{when?}.

We will prove that $\det(\rho_{\lambda}(\varphi))=p$ in the
special case when $\eps=1$. This will follow from the equality
\begin{equation}\label{eqn:det_rho}
  \det(\rho_{\lambda})=\chi_{\ell},
\end{equation}
where $\chi_{\ell}$ is the $\ell$th cyclotomic character
\[
 \chi_{\ell}:\GalQ\into\Zl^{*}\subset{}K_{\lambda}^{*},
\]
which gives the action of $\GalQ$ on $\mu_{\ell^\infty}$.
We have $\chi_{\ell}(\vphi)=p$ because $\vphi$ induces induces
$p$th powering map on $\mu_{\ell^\infty}$.

It remains to establish (\ref{eqn:det_rho}).
The simplest case is when~$A$ is an elliptic curve.
In \cite[]{silverman:aec}\edit{get ref}, Silverman shows that
$\det(\rho_{\ell})=\chi_{\ell}$ using the Weil pairing.
We will consider the Weil pairing in more generality in
the next section, and use it to establish (\ref{eqn:det_rho}).

\subsection{The Weil pairing}\label{sec:weil_pairing_a}
Let $T_\ell(A) = \varprojlim_{n\geq 1} A[\ell^n]$, so
$\Tate_{\ell}(A) = \Ql \tensor T_\ell(A)$.
The Weil pairing is a nondegenerate perfect pairing
\[
   e_\ell: T_{\ell}(A) \times T_{\ell}(A^{\dual}) \to \Z_\ell(1).
\]
(See e.g., \cite[\S16]{milne:abvars} for a summary of some
of its main properties.)
\begin{remark}
Identify $\Z/\ell^n\Z$ with $\mu_{\ell^n}$ by
$1\mapsto e^{-2\pi i/\ell^n}$, and extend to
a map $\Z_\ell\to \Z_\ell(1)$. 
If $J=\Jac(X)$ is a Jacobian, then the Weil pairing on~$J$
is induced by the canonical isomorphism
\[
  T_\ell(J) \isom \H^1(X,\Z_\ell) = \H^1(X,\Z)\tensor\Z_\ell,
\]
and the cup product pairing
\[
    \H^1(X,\Z_\ell) \otimes_{\Z_\ell} \H^1(X,\Z_\ell)
        \xrightarrow{\,\,\union\,\,} \Z_\ell.
\]
For more details see the discussion on pages 210--211 of Conrad's
appendix to \cite{ribet-stein:serre}, and the references therein.  In
particular, note that $\H^1(X,\Z_\ell)$ is isomorphic to
$\H_1(X,\Z_\ell)$, because $\H_1(X,\Z_\ell)$ is self-dual because of
the intersection pairing.  It is easy to see that
$\H_1(X,\Z_\ell)\isom T_\ell(J)$ since by Abel-Jacobi $J\isom T_0(J)/\H_1(X,\Z)$,
where $T_0(J)$ is the tangent space at~$J$ at~$0$ (see Lemma~\ref{lem:dimtate}).
\edit{Remove or expand?}
\end{remark}

Here $\Z_\ell(1) \isom \varprojlim \mu_{\ell^n}$ is isomorphic
to $\Z_\ell$ as a ring, but has the action of $\GalQ$ induced
by the action of $\GalQ$ on $\varprojlim \mu_{\ell^n}$.  Given
$\sigma\in\GalQ$, there is an element $\chi_\ell(\sigma)\in \Z_\ell^*$
such that $\sigma(\zeta) = \zeta^{\chi_\ell(\sigma)}$, for every
$\ell^n$th root of unity $\zeta$.  If we view $\Z_\ell(1)$ as
just $\Z_\ell$ with an action of $\GalQ$, then the action of
$\sigma\in\GalQ$ on $\Z_\ell(1)$ is left multiplication by
$\chi_\ell(\sigma)\in \Z_\ell^*$.  
\begin{definition}[Cyclotomic Character]
The homomorphism
\[
  \chi_\ell:\GalQ\to\Z_\ell^*
\]
is called the {\em $\ell$-adic cyclotomic character}.
\end{definition}

If $\vphi:A\to A^{\vee}$ is a polarization (so it is
an isogeny defined by translation of an ample
invertible sheaf), we define a pairing
\begin{equation}\label{eqn:weilphi}
   e^{\vphi}_\ell: T_{\ell}(A) \times T_{\ell}(A) \to \Z_\ell(1)
\end{equation}
by $e^{\vphi}_{\ell}(a,b) = e_{\ell}(a,\vphi(b))$.
%According to \cite[\S16]{milne:abvars},
The pairing (\ref{eqn:weilphi}) is a skew-symmetric, nondegenerate,
bilinear pairing that is $\GalQ$-equivariant, in the sense that
if $\sigma\in\GalQ$, then
\[
  e^{\vphi}_\ell(\sigma(a),\sigma(b)) =
  \sigma \cdot e^{\vphi}_\ell(a,b) =
   \chi_\ell(\sigma)e^{\vphi}_\ell(a,b).
\]


We now apply the Weil pairing in the special case
$A=A_f\subset J_1(N)$.  Abelian varieties attached to modular
forms are equipped with a canonical polarization called
the {\em modular polarization}.
The canonical principal polarization
of $J_1(N)$ is an isomorphism
$J_1(N)\iso J_1(N)^{\dual}$, so we obtain the modular polarization
$\vphi=\vphi_A:A\to A^{\dual}$ of $A$, as illustrated in the following
diagram:
\[
 \xymatrix{
{J_1(N)}\ar[rrr]^-{\txt{autoduality}\,\isom}&&&{J_1(N)^{\dual}}\ar[d]\\
   A\ar[u]\ar[rrr]^-{\txt{polarization}\, \vphi_A} &&& A^{\dual}}
\]

Consider (\ref{eqn:weilphi}) with $\vphi = \vphi_A$ the modular
polarization. Tensoring over~$\Q$ and
restricting to $\Tate_{\lambda}(A)$, we obtain
a nondegenerate skew-symmetric bilinear pairing
\begin{equation}\label{eqn:pairing_e}
  e: \Tate_{\lambda}(A)\times\Tate_{\lambda}(A)\to \Ql(1).
\end{equation}
The nondegeneracy follows from the nondegeneracy of
$e_{\ell}^{\vphi}$ and the observation that
$$e_\ell^{\vphi}(\Tate_{\lambda}(A),\Tate_{\lambda'}(A))=0$$ when
$\lambda\neq\lambda'$.  This uses the Galois equivariance of
$e_{\ell}^{\phi}$ carries over to Galois equivariance of~$e$, in
the following sense. If $\sigma\in\GalQ$ and
$x,y\in\Tate_{\lambda}(A)$, then
\[
  e(\sigma{}x,\sigma{}y) = \sigma e(x,y)=
\chi_{\ell}(\sigma)e(x,y).
\]
Note that $\sigma$ acts on $\Q_{\ell}(1)$ as multiplication by
$\chi_{\ell}(\sigma)$.


\subsection{The Determinant}\label{sec:detdet}
There are two proofs of the theorem, a fancy proof and a concrete
proof.  We first present the fancy proof. The pairing~$e$ of
(\ref{eqn:pairing_e}) is a skew-symmetric and bilinear form so it
determines a $\GalQ$-equivarient homomorphism
\begin{equation}\label{eqn:weil_wedge}
  \bigwedge^2_{K_{\lambda}}\Tate_{\lambda}(A)\into\Q_{\ell}(1).
\end{equation}
It is not {\em a priori} true that we can take the wedge product over
$K_{\lambda}$ instead of $\Ql$, but we can because $e(tx,y)=e(x,ty)$
for any $t\in{}K_{\lambda}$.  This is where we use that~$A$ is
attached to a newform with trivial character, since when the character
is nontrivial, the relation between $e(T_p x,y)$ and $e(x,T_p y)$ 
will involve $\dbd{p}$.  Let
$D=\bigwedge^2\Tate_{\lambda}(A)$ and note that $\dim_{K_{\lambda}}
D=1$, since $\Tate_{\lambda}(A)$ has dimension~$2$ over $K_\lambda$.

There is a canonical isomorphism
\[
  \Hom_{\Ql}(D,\Ql(1))\isom\Hom_{K_{\lambda}}(D,K_{\lambda}(1)),
\]
and the map of (\ref{eqn:weil_wedge}) maps to an isomorphism
$D\isom K_{\lambda}(1)$ of $\GalQ$-modules.
Since the representation of $\GalQ$ on~$D$ is the
determinant, and the representation on $K_{\lambda}(1)$
is the cyclotomic character $\chi_\ell$,
it follows that $\det\rho_{\lambda}=\chi_{\ell}$.

Next we consider a concrete proof.
If $\sigma\in\GalQ$, then we must show that
$\det(\sigma)=\chi_{\ell}(\sigma)$. Choose
a basis $x,y\in\Tate_{\lambda}(A)$ of $\Tate_{\lambda}(A)$
as a $2$ dimensional $K_{\lambda}$ vector space.
We have $\sigma(x)=ax+cy$ and $\sigma(y)=bx+dy$,
for $a,b,c,d\in{}K_{\lambda}$.
Then
\begin{align*}
\chi_{\ell}(\sigma)e(x,y)&=\langle\sigma{}x,\sigma{}y)\\
&=e(ax+cy,bx+dy)\\
&=e(ax,bx)+e(ax,dy)+e(cy,bx)+e(cy,dy)\\
&=e(ax,dy)+e(cy,bx)\\
&=e(adx,y)-e(bcx,y)\\
&=e((ad-bc)x,y)\\
&= (ad-bc)e(x,y)
\end{align*}
To see that $e(ax,bx)=0$, note that
\[
e(ax,bx)=e(abx,x)=
-e(x,abx)=-e(ax,bx).
\]
Finally, since~$e$ is nondegenerate, there exists $x,y$ such
that $e(x,y)\neq 0$, so $\chi_{\ell}(\sigma) = ad-bc = \det(\sigma)$.



\section{Remarks about the modular polarization}
Let~$A$ and~$\vphi$ be as in Section~\ref{sec:weil_pairing_a}.
The degree $\deg(\vphi)$ of the modular polarization of~$A$ is
an interesting arithmetic invariant of~$A$.  If $B\subset J_1(N)$
is the sum of all modular abelian varieties $A_g$ attached to
newforms $g \in S_2(\Gamma_1(N))$, with~$g$ not a Galois conjugate
of~$f$ and of level dividing~$N$, then $\ker(\vphi) \isom A \meet B$, as
illustrated in the following diagram:
\[
\xymatrix{
 & {\ker(\vphi_B)}\ar[dr]\ar[d]^{\isom}\\
{\ker(\vphi_Ai)}\ar[r]^{\isom}\ar[dr] & {A \cap B}\ar[r]\ar[d] & B\ar[d]\ar[dr]\\
  & {A}\ar[r]\ar[dr]^{\vphi} & {J_1(N)}\ar[d]\ar[r] & B^{\vee}\\
    & & {A^{\dual}}
}
\]
Note that $\ker(\vphi_B)$ is also isomorphic to $A\meet B$, as
indicated in the diagram.

In connection with Section~\ref{sec:int_con},
the quantity $\ker(\vphi_A)=A\meet B$ is closely related to
congruences between~$f$ and eigenforms orthogonal to the
Galois conjugates of~$f$.

When~$A$ has dimension~$1$, we may alternatively view~$A$
as a quotient of $X_1(N)$ via the map
\[
  X_1(N)\to J_1(N)\to A^{\dual}\isom A.
\]
Then $\vphi_A : A\to A$ is pullback of divisors to $X_1(N)$ followed
by push forward, which is multiplication by the degree.  Thus
$\vphi_A = [n]$, where~$n$ is the degree of the morphism $X_1(N)\to A$
of algebraic curves.  The {\em modular degree} is
\[
  \deg(X_1(N)\to A) = \sqrt{\deg(\vphi_A)}.
\]
More generally, if $A$ has dimension greater than~$1$, then
$\deg(\vphi_A)$ has order a perfect square (for references,
see \cite[Thm.~13.3]{milne:abvars}),
and we define the {\em modular degree} to be $\sqrt{\deg(\vphi_A)}$.

Let $f$ be a newform of level~$N$.  In the spirit of
Section~\ref{sec:int_cong} we use congruences to define a number
related to the modular degree, called the congruence number. For a
subspace $V\subset S_2(\Gamma_1(N))$, let $V(\Z) = V\cap \Z[[q]]$ be
the elements with integral $q$-expansion at~$\infty$ and $V^{\perp}$
denotes the orthogonal complement of $V$ with respect to the Petersson
inner product.  The {\em congruence number} of~$f$ is
\[
  r_f = \#\frac{S_2(\Gamma_1(N))(\Z)}
       {V_f(\Z) + V_f^{\perp}(\Z)},
\]
where $V_f$ is the complex vector space spanned by the Galois
conjugates of~$f$.    We thus have two positive associated to~$f$, the
congruence number $r_f$ and the modular degree $m_f$ of of~$A_f$.
\begin{theorem}
$m_f \mid r_f$
\end{theorem}
Ribet mentions this in the case of elliptic curves in [ZAGIER, 1985]
\cite{zagier:parametrizations}, but the statement is given incorrectly
in that paper (the paper says that $r_f\mid m_f$, which is
wrong).  The proof for dimension greater than one is in [AGASHE-STEIN,
Manin constant...].    Ribet also subsequently proved that if
$p^2\nmid N$, then $\ord_p(m_f) = \ord_p(r_f)$. 

We can make the same definitions with $J_1(N)$ replaced by $J_0(N)$,
so if $f\in S_2(\Gamma_0(N))$ is a newform, $A_f\subset J_0(N)$, and
the congruence number measures congruences between~$f$ and other
forms in $S_2(\Gamma_0(N))$. 
In \cite[Ques.~4.4]{frey-muller}, they ask whether it is always the
case that $m_f = r_f$ when $A_f$ is an elliptic curve, and $m_f$
and $r_f$ are defined relative to $\Gamma_0(N)$. 
I\edit{change...} implemented an algorithm in MAGMA to compute $r_f$,
and found the first few counterexamples, which occur when
$$N = 54, 64, 72, 80, 88, 92, 96, 99, 108, 120, 124, 
126, 128, 135, 144.$$
For example, the elliptic curve~$A$ labeled~54B1 in~\cite{cremona:algs} 
has $r_A=6$
and $m_A=2$.  To see directly that $3 \mid r_A$, observe that if~$f$
is the newform corresponding to~$E$ and~$g$ is the newform
corresponding to $X_0(27)$, then $g(q) + g(q^2)$ is congruent to~$f$
modulo~$3$.  This is consistent with Ribet's theorem that if $p\mid
r_A/m_A$ then $p^2\mid N$. There seems to be no absolute bound on
the~$p$ that occur.

It would be interesting to determine the answer to the analogue of the
question of Frey-Mueller for $\Gamma_1(N)$.  For example, if $A\subset
J_1(54)$ is the curve isogeneous to 54B1, then $m_A = 18$ is divisible
by $3$.  However, I do not know\edit{fix} $r_A$ in this case, because
I haven't written a program to compute it for $\Gamma_1(N)$.  


%%% Local Variables: 
%%% TeX-master: "~/books/ribet-stein/main/main.tex"
%%% End: 
\chapter{Modularity of Abelian Varieties}


\section{Modularity over~$\Q$}

\begin{definition}[Modular Abelian Variety]
  Let $A$ be an abelian variety over~$\Q$.  Then~$A$ is {\em modular}
  if there exists a positive integer~$N$ and a surjective map
  $J_1(N)\to A$ defined over~$\Q$.
\end{definition}

The following theorem is the culmination of a huge amount of work,
which started with Wiles's successful attack \cite{wiles:fermat} on
Fermat's Last Theorem, and finished with
\cite{breuil-conrad-diamond-taylor}.
\begin{theorem}[Breuil, Conrad, Diamond, Taylor, Wiles]\label{thm:modularity_theorem}
  Let~$E$ be an elliptic curve over~$\Q$.  Then~$E$ is modular.
\end{theorem}
We will say nothing about the proof here.\edit{Also pointer to later
  in book.}

If~$A$ is an abelian variety over~$\Q$, let $\End_{\Q}(A)$ denote the
ring of endomorphisms of~$A$ that are defined over~$\Q$.
\begin{definition}[$\GL_2$-type]
  An abelian variety~$A$ over~$\Q$ is of {\em $\GL_2$-type} if the
  endomorphism algebra $\Q\tensor \End_\Q(A)$ contains a number field
  of degree equal to the dimension of~$A$.
\end{definition}

For example, every elliptic curve~$E$ over~$\Q$ is trivially
of~$\GL_2$-type, since $\Q\subset \Q\tensor \End_\Q(E)$.

\begin{proposition}\label{prop:tanspace}
If $A$ is an abelian variety over~$\Q$, and 
$K\subset \Q\tensor\End_\Q(A)$ is a field, then
$[K:\Q]$ divides $\dim A$.
\end{proposition}
\begin{proof}
  As discussed in \cite[\S2]{ribet:abvars},~$K$ acts faithfully on the
  tangent space $\Tan_0(A/\Q)$ over~$\Q$ to~$A$ at~$0$, which is
  a~$\Q$ vector space of dimension $\dim(A)$.  Thus $\Tan_0(A/\Q)$ is
  a vector space over~$K$, hence has $\Q$-dimension a multiple of
  $[K:\Q]$.
\end{proof}

Proposition~\ref{prop:tanspace} implies, in particular, that if~$E$ is
an elliptic curve over~$\Q$, then $\End_\Q(E)=\Q$.  Recall\edit{from
  where} that~$E$ {\em has CM} or is a {\em complex multiplication}
elliptic curve if $\End_{\Qbar}(E)\neq \Z$).
Proposition~\ref{prop:tanspace} implies that if~$E$ is a CM elliptic
curve, the extra endomorphisms are {\em never} defined over~$\Q$.

\begin{proposition}
  Suppose~$A=A_f\subset J_1(N)$ is an abelian variety attached to a
  newform of level~$N$.  Then~$A$ is of $\GL_2$-type.
\end{proposition}
\begin{proof}
  The endomorphism ring of $A_f$ contains $\O_f = \Z[\ldots,
  a_n(f),\ldots]$, hence the field $K_f = \Q(\ldots, a_n(f), \ldots)$
  is contained in $\Q\tensor\End_\Q(A)$.  Since $A_f = n \pi J_1(N)$,
  where~$\pi$ is a projector onto the factor $K_f$ of the anemic Hecke
  algebra $\T_0\tensor_\Z\Q$, we have $\dim A_f = [K_f:\Q]$.  (One way
  to see this is to recall that the tangent space
  $T=\Hom(S_2(\Gamma_1(N)),\C)$ to $J_1(N)$ at~$0$ is free of rank~$1$
  over $\T_0\tensor_\Z\C$.)
\end{proof}

\begin{conjecture}[Ribet]\label{conj:modularity}
  Every abelian variety over~$\Q$ of $\GL_2$-type is modular.
\end{conjecture}

Suppose
$$\rho:\Gal(\Qbar/\Q)\to \GL_2(\Fbar_p)$$
is an odd irreducible
continuous Galois representation, where odd means that
$$\det(\rho(c))=-1,$$
where~$c$ is complex conjugation.  We say that
$\rho$ is {\em modular} if there is a newform $f\in S_k(\Gamma_1(N))$,
and a prime ideal $\wp\subset \O_f$ such that for all $\ell\nmid Np$,
we have
\begin{align*}
  \Tr(\rho(\Frob_\ell)) &\con a_\ell \pmod{\wp},\\
  \Det(\rho(\Frob_\ell)) &\con \ell^{k-1} \cdot \eps(\ell) \pmod{\wp}.
\end{align*}
Here $\chi_p$ is the $p$-adic cyclotomic
character, and~$\eps$ is the (Nebentypus) character of the
newform~$f$.  
\begin{conjecture}[Serre]\label{conj:serre_mod}
Every odd irreducible continuous representation
$$\rho:\Gal(\Qbar/\Q)\to \GL_2(\Fbar_p)$$
is modular.  Moreover, there
is a formula for the ``optimal'' weight~$k(\rho)$ and level $N(\rho)$
of a newform that gives rise to~$\rho$.  
\end{conjecture}
In \cite{serre:conjectures}, Serre describes the formula for the
weight and level.  Also, it is now known due to work of Ribet,
Edixhoven, Coleman, Voloch, Gross, and others that if~$\rho$ is
modular, then~$\rho$ arises from a form of the conjectured weight and
level, except in some cases when $p=2$.  (For more details see the
survey paper \cite{ribet-stein:serre}.)  However, the full
Conjecture~\ref{conj:serre_mod} is known in very few cases. 

\begin{remark}
  There is interesting recent work of Richard Taylor which connects
  Conjecture~\ref{conj:serre_mod} with the open question of whether
  every variety of a certain type has a point over a solvable
  extension of~$\Q$.  The question of the existence of solvable points
  (``solvability of varieties in radicals'') seems very difficult.
  For example, we don't even know the answer for genus one curves, or
  have a good reason to make a conjecture either way (as far as I
  know\edit{fix}).  There's a book of Mike Fried that discusses this
  solvability question.\edit{Find the exact reference in that book and
    the exact book.}
\end{remark}

Serre's conjecture is very strong.  For example, it would imply
modularity of all abelian varieties over~$\Q$ that could possibly be
modular, and the proof of this implication does not rely on
Theorem~\ref{thm:modularity_theorem}.

\begin{theorem}[Ribet]\label{thm:serre_implies_modularity}
  Serre's conjectures on modularity of all odd irreducible mod~$p$
  Galois representations implies Conjecture~\ref{conj:modularity}.
\end{theorem}

To give the reader a sense of the connection between Serre's
conjecture and modularity, we sketch some of the key ideas of the
proof of Theorem~\ref{thm:serre_implies_modularity}; for more details
the reader may consult Sections~1--4 of~\cite{ribet:abvars}.
  
Without loss, we may assume that~$A$ is $\Q$-simple.  As explained in
the not trivial \cite[Thm.~2.1]{ribet:abvars}, this hypothesis implies
that
$$ 
  K = \Q\tensor_\Z \End_{\Q}(A)
  $$
  is a number field of degree $\dim(A)$.  The Tate modules
  $$
  \Tate_\ell(A)= \Q_\ell\tensor\varprojlim_{n\geq 1} A[\ell^n]
  $$
  are free of rank two over $K\tensor\Q_{\ell}$, so the action of
  $\Gal(\Qbar/\Q)$ on $\Tate_\ell(A)$ defines a representation
  $$
  \rho_{A,\ell} : \Gal(\Qbar/\Q) \to \GL_2(K\tensor \Q_{\ell}).
  $$
\begin{remarks}
  That these representations take values in $\GL_2$ is why such~$A$
  are said to be ``of $\GL_2$-type''.  Also, note that the above
  applies to $A=A_f\subset J_1(N)$, and the $\ell$-adic
  representations attached to~$f$ are just the factors of
  $\rho_{A,\ell}$ coming from the fact that $K\tensor\Q_{\ell}\isom
  \prod_{\lambda\mid \ell} K_{\lambda}.$
\end{remarks}

The deepest input to Ribet's proof is Faltings's isogeny theorem,
which Faltings proved in order to prove Mordell's conjecture (there
are only a finite number of $L$-rational points on any curve over~$L$
of genus at least~$2$).  

If~$B$ is an abelian variety over~$\Q$, let
$$
   L(B,s) = \prod_{\text{all primes }p}
\frac{1}{\det\left(1-p^{-s}\cdot \Frob_p|\Tate_{\ell}(A)\right)}
 = \prod_p L_p(B,s),
$$
 where~$\ell$ is a prime of good reduction (it makes no difference
 which one).
\begin{theorem}[Faltings]\label{thm:faltings}
  Let $A$ and $B$ be abelian varieties.  Then~$A$ is isogenous to~$B$
  if and only if $L_p(A,s) = L_p(B,s)$ for almost all~$p$.
\end{theorem}

Using an analysis of Galois representations and properties of
conductors and applying results of Faltings, Ribet finds an infinite
set~$\Lambda$ of primes of~$K$ such that all $\rho_{A,\lambda}$ are
irredudible and there only finitely many Serre invariants
$N(\rho_{A,\lambda})$ and $k(\rho_{A,\lambda})$.  For each of
these~$\lambda$, by Conjecture~\ref{conj:serre_mod} there is a
newform~$f_{\lambda}$ of level $N(\rho_{A,\lambda}))$ and weight
$k(\rho_{A,\lambda})$ that gives rise to the mod~$\ell$ representation
$\rho_{A,\lambda}$.  Since~$\Lambda$ is infinite, but there are only
finitely many Serre invariants $N(\rho_{A,\lambda}))$,
$k(\rho_{A,\lambda})$, there must be a single newform~$f$ and an
infinite subset $\Lambda'$ of $\Lambda$ so that for every
$\lambda\in\Lambda'$ the newform~$f$ gives rise to $\rho_{A,\lambda}$.

Let $B=A_f\subset J_1(N)$ be the abelian variety attached to~$f$.
Fix any prime~$p$ of good reduction. 
There are infinitely many primes $\lambda\in\Lambda'$ such
that $\rho_{A,\lambda}\isom \rho_{B,\tilde{\lambda}}$ for
some $\tilde{\lambda}$, and for these $\lambda$,
$$
  \det\left(1-p^{-s}\cdot \Frob_p|A[\lambda]\right)
   = 
  \det\left(1-p^{-s}\cdot \Frob_p|B[\tilde{\lambda}]\right).
  $$
  This means that the degree two polynomials in $p^{-s}$ (over the
  appropriate fields, e.g., $K\tensor\Q_{\ell}$ for~$A$)
$$\det\left(1-p^{-s}\cdot \Frob_p|\Tate_{\ell}(A)\right)$$
and
$$\det\left(1-p^{-s}\cdot \Frob_p|\Tate_{\ell}(B)\right)$$
are congruent modulo infinitely many primes.  Therefore 
they are equal. By Theorem~\ref{thm:faltings}, it follows
that $A$ is isogenous to~$B=A_f$, so~$A$ is modular.


\section{Modularity of elliptic curves over $\Qbar$}
\begin{definition}[Modular Elliptic Curve] 
  An elliptic curve~$E$ over~$\Qbar$ is {\em modular} if there is a
  surjective morphism $X_1(N)\to{}E$ for some~$N$.
\end{definition}

\begin{definition}[$\Q$-curve]
  An elliptic curve~$E$ over~$\Q$-bar is a {\em $\Q$-curve} if for
  every $\sigma\in\Gal(\Qbar/\Q)$ there is an isogeny $E^\sigma \to E$
  (over~$\Qbar$).
\end{definition}

\begin{theorem}[Ribet]
  Let~$E$ be an elliptic curve over~$\Qbar$.  If~$E$ is modular,
  then~$E$ is a $\Q$-curve, or~$E$ has CM.
\end{theorem}

This theorem is proved in \cite[\S5]{ribet:abvars}. 



\begin{conjecture}[Ribet]\label{conj:modqcurve}
  Let~$E$ be an elliptic curve over~$\Qbar$.  If~$E$ is a $\Q$-curve,
  then~$E$ is modular.
\end{conjecture}
In \cite[\S6]{ribet:abvars}, Ribet proves that
Conjecture~\ref{conj:serre_mod} implies
Conjecture~\ref{conj:modqcurve}.  He does this by showing that if a
$\Q$-curve~$E$ does not have CM then there is a $\Q$-simple abelian
variety~$A$ over~$\Q$ of $\GL_2$-type such that~$E$ is a simple factor
of~$A$ over~$\Qbar$.  This is accomplished finding a model for~$E$
over a Galois extension~$K$ of~$\Q$, restricting scalars down to~$\Q$
to obtain an abelian variety $B=\Res_{K/\Q}(E)$, and using Galois
cohomology computations (mainly in $\H^2$'s) to find the required~$A$
of $\GL_2$-type inside~$B$.  Then
Theorem~\ref{thm:serre_implies_modularity} and our assumption that
Conjecture~\ref{conj:serre_mod} is true together immediately imply
that~$A$ is modular.

Ellenberg and Skinner \cite{ellenberg-skinner:modularity} have
recently used methods similar to those used by Wiles to prove strong
theorems toward Conjecture~\ref{conj:modqcurve}. See also Ellenberg's
survey \cite{ellenberg:qcurves_survey}, which discusses earlier
modularity results of Hasegawa, Hashimoto, Hida, Momose, and Shimura,
and gives an example to show that there are infinitely many
$\Q$-curves whose modularity is not known.


\begin{theorem}[Ellenberg, Skinner]
  Let $E$ be a $\Q$-curve over a number field~$K$ with semistable
  reduction at all primes of~$K$ lying over~$3$, and suppose 
  that~$K$ is unramified at~$3$. Then~$E$ is modular.
\end{theorem}

\section{Modularity of abelian varieties over $\Qbar$}
Hida discusses modularity of abelian varieties over $\Qbar$ in
\cite{hida:modularity}.  Let $A$ be an abelian variety over $\Qbar$.
For any subalgebra $E\subset \Q\tensor \End(A/\Qbar)$, let $\Q\tensor
\End_E(A/\Qbar)$ be the subalgebra of endomorphism that commute
with~$E$.

\begin{definition}[Real Multiplication Abelian Variety]
  An abelian variety~$A$ over $\Qbar$ is a {\em real multiplication
    abelian variety} if there is a totally real field~$K$ with
  $[K:\Q]=\dim(A)$ such that
 $$K\subset \Q\tensor \End(A/\Qbar) \qquad\text{and}\qquad
K = \Q\tensor\End_{K}(A/\Qbar).$$
\end{definition}

If $E$ is a CM elliptic curve, then $E$ is {\em not} a 
real multiplication abelian variety, because the extra
CM endomorphisms in $\End(E/\Qbar)$ commute with $K=\Q$,
so $K \neq \Q\tensor\End_{K}(A/\Qbar)$. 

In analogy with $\Q$-curves, Hida makes the following
definition.
\begin{definition}[$\Q$-RMAV]
  Let $A$ be an abelian variety over~$\Qbar$ with real
  multiplication by a field~$K$.  Then~$A$ is a {\em $\Q$-real
    multiplication abelian variety} (abbreviated $\Q$-RMAV) if for
  every $\sigma\in\Gal(\Qbar/\Q)$ there is a $K$-linear isogeny
  $A^{\sigma} \to A$.  Here~$K$ acts on $A^{\sigma}$ via the canonical
  isomorphism $\End(A) \to \End(A^{\sigma})$, which exists since
  applying~$\sigma$ is nothing but relabeling everything.
\end{definition}

I haven't had sufficient time to absorb Hida's paper to see just what
he proves about such abelian varieties, so I'm not quite sure how to
formulate the correct modularity conjectures and theorems in this
generality.

Elizabeth Pyle's Ph.D. thesis \cite{pyle:thesis} under Ribet about
``building blocks'' is also very relevant to this section.


%%% Local Variables: 
%%% mode: latex
%%% TeX-master: main.tex
%%% TeX-master: "main"
%%% End: 
\chapter{$L$-functions}

\section{$L$-functions attached to modular forms}
Let $f=\sum_{n\geq 1} a_n q^n\in S_k(\Gamma_1(N))$ be a cusp form.
\begin{definition}[$L$-series]
\label{defn:lseries_f}
The {\em $L$-series} of~$f$ is 
$$
   L(f,s) = \sum_{n\geq 1} \frac{a_n}{n^s}.
$$
\end{definition}

\begin{definition}[$\Lambda$-function]
\label{defn:lambda_f}
The {\em completed $\Lambda$ function} of~$f$ is
$$
   \Lambda(f,s) = N^{s/2} (2\pi)^{-s} \Gamma(s) L(f,s),
$$
where 
$$
  \Gamma(s) = \int_{0}^{\infty} e^{-t} t^s \frac{dt}{t}
$$
is the $\Gamma$ function (so $\Gamma(n)=(n-1)!$ for positive
integers~$n$).
\end{definition}

We can view $\Lambda(f,s)$ as a (Mellin) transform of~$f$,
in the following sense:
\begin{proposition}\label{prop:mellin}
We have
$$ \Lambda(f,s) = N^{s/2} \int_{0}^{\infty} f(iy) y^s \frac{dy}{y}, $$
and this integral converges for $\Re(s)>\frac{k}{2}+1$.
\end{proposition}
\begin{proof}
We have
\begin{align*}
 \int_0^\infty f(iy)y^s \frac{dy}{y} &= 
   \int_0^\infty \sum_{n=1}^{\infty} a_n e^{-2\pi n y} y^s \frac{dy}{y} \\
  &= \sum_{n=1}^{\infty} a_n \int_{0}^{\infty} e^{-t}(2\pi n)^{-s} t^s\frac{dt}{t} \qquad(t=2\pi ny)\\
  &= (2\pi)^{-s} \Gamma(s) \sum_{n=1}^{\infty} \frac{a_n}{n^s}.
\end{align*}
To go from the first line to the second line, we reverse the summation
and integration and perform the change of variables $t=2\pi n y$.
(We omit discussion of convergence.\edit{change for book})
\end{proof}


\subsection{Analytic continuation and functional equations}
We define the {\em Atkin-Lehner operator} $W_N$ on $S_k(\Gamma_1(N))$
as follows.  If $w_N=\smallmtwo{0}{-1}{N}{0}$, then $[w_N^2]_k$ acts
as $(-N)^{k-2}$, so if
$$
  W_N(f) = N^{1-\frac{k}{2}}\cdot f|[w_N]_k,
  $$
  then $W_N^2 = (-1)^k$. (Note that $W_N$ is an involution when~$k$
  is even.)  It is easy to check directly that if
  $\gamma\in\Gamma_1(N)$, then $w_N \gamma w_N^{-1}\in\Gamma_1(N)$, so
  $W_N$ preserves $S_k(\Gamma_1(N))$.  Note that in general $W_N$ does
  {\em not} commute with the Hecke operators $T_p$, for $p\mid N$.
  
  The following theorem is mainly due to Hecke (and maybe other
  people, at least in this generality).  For a very general version of
  this theorem, see \cite{winnie:newforms}.\edit{Add refs. -- see page
    58 of Diamond-Im.}
\begin{theorem}\label{thm:funceqn}
Suppose $f\in S_k(\Gamma_1(N),\chi)$ is a cusp form with character~$\chi$.
Then $\Lambda(f,s)$ extends to an entire (holomorphic on all of~$\C$) 
function which satisfies the functional equation
$$
  \Lambda(f,s) = i^k \Lambda(W_N(f), k-s).
$$
\end{theorem}
Since $N^{s/2}(2\pi)^{-s} \Gamma(s)$ is everywhere nonzero,
Theorem~\ref{thm:funceqn} implies that $L(f,s)$ also extends to 
an entire function.

It follows from Definition~\ref{defn:lambda_f} that $\Lambda(c f,
s)=c\Lambda(f,s)$ for any $c\in\C$.  Thus if~$f$ is a $W_N$-eigenform,
so that $W_N(f)=w f$ for some $w\in\C$, then the
functional equation becomes
$$
  \Lambda(f,s) = i^k w \Lambda(f,k-s).
$$
If $k=2$, then $W_N$ is an involution, so $w=\pm
1$, and the sign in the functional equation is $\eps(f) = i^k w = -w$,
which is the negative of the sign of the Atkin-Lehner involution $W_N$
on~$f$.  It is straightforward to show that $\eps(f) = 1$ if and only
if $\ord_{s=1} L(f,s)$ is even.  Parity observations such as
this are extremely useful when trying to understand the Birch and
Swinnerton-Dyer conjecture.


\begin{proof}[Sketch of proof of Theorem~\ref{thm:funceqn} when $N=1$]
We follow \cite[\S VIII.5]{knapp:elliptic} closely.
  
  Note that since $w_1=\smallmtwo{0}{1}{-1}{0}\in\SL_2(\Z)$, the condition $W_1(f)=f$ is
  satisfied for any $f\in S_k(1)$.  This translates into the equality
  \begin{equation}\label{eqn:trans1}
    f\left(-\frac{1}{z}\right) = z^k f(z).
  \end{equation}
  Write $z=x+iy$ with $x$ and $y$ real.  Then (\ref{eqn:trans1})
  along the positive imaginary axis (so $z=iy$ with $y$ positive real) 
is
  \begin{equation}\label{eqn:trans2}
  f\left(\frac{i}{y}\right) =i^k y^k f(iy).
  \end{equation}
  From Proposition~\ref{prop:mellin} we have
  \begin{equation}\label{eqn:heckeproof1}
  \Lambda(f,s) = \int_{0}^{\infty} f(iy) y^{s-1} dy,
  \end{equation}
  and this integral converges for $\Re(s) >
  \frac{k}{2} + 1$.
    
  Again using growth estimates, one shows that
  $$
    \int_{1}^{\infty} f(iy)y^{s-1} dy
  $$
  converges for all~$s\in\C$, and defines an entire function.
 Breaking the path in (\ref{eqn:heckeproof1}) at $1$, we have
 for $\Re(s)>\frac{k}{2}+1$ that
  $$
 \Lambda(f,s) =  
      \int_{0}^{1} f(iy) y^{s-1} dy +  \int_{1}^{\infty} f(iy) y^{s-1} dy.
  $$
Apply the change of variables $t=1/y$ to
the first term and use (\ref{eqn:trans2}) to get
\begin{align*}
\int_{0}^{1} f(iy) y^{s-1} dy &=
  \int_{\infty}^{1} -f(i/t)t^{1-s} \frac{1}{t^2} dt \\
 &= \int_{1}^{\infty} f(i/t)t^{-1-s} dt\\
 &= \int_{1}^{\infty} i^k t^k f(it)t^{-1-s} dt\\
 &= i^k \int_{1}^{\infty} f(it)t^{k-1-s} dt.
\end{align*}
Thus
  $$
 \Lambda(f,s) =  
      i^k \int_{1}^{\infty} f(it)t^{k-s-1} dt
               +  \int_{1}^{\infty} f(iy) y^{s-1} dy.
  $$
The first term is just a translation of the second, so the first
term extends to an entire function as well.  Thus 
$\Lambda(f,s)$ extends to an entire function.

The proof of the general case for $\Gamma_0(N)$ is almost the same,
except the path is broken at $1/\sqrt{N}$, since $i/\sqrt{N}$ is
a fixed point for $w_N$.  
\end{proof}

\subsection{A Conjecture about nonvanishing of $L(f,k/2)$}
Suppose $f\in S_k(1)$ is an eigenform.  If $k\con 2\pmod{4}$, then
$L(f,k/2)=0$ for reasons related to the discussion after the statement
of Theorem~\ref{thm:funceqn}.  On the other hand, if $k\con
0\pmod{4}$, then $\ord_{s=k/2}L(f,k/2)$ is even, so $L(f,k/2)$ may
or may not vanish.
\begin{conjecture}\label{conj:central_nonvanish}
Suppose $k\con 0\pmod{4}$.  Then $L(f,k/2)\neq 0$.
\end{conjecture}
According to \cite{conrey-farmer:nonvanish},
Conjecture~\ref{conj:central_nonvanish} is true for weight~$k$ if
there is some~$n$ such that the characteristic polynomial of $T_n$ on
$S_k(1)$ is irreducible.  Thus Maeda's conjecture implies
Conjecture~\ref{conj:central_nonvanish}.  Put another way, if you find
an~$f$ of level~$1$ and weight $k\con 0\pmod{4}$ such that
$L(f,k/2)=0$, then Maeda's conjecture is false for weight~$k$.  

%Oddly enough,\edit{remove from book} I personally find
%Conjecture~\ref{conj:central_nonvanish} less convincing that Maeda's
%conjecture, despite it being a weaker conjecture.

\subsection{Euler products}
Euler products make very clear how $L$-functions of eigenforms encode
deep arithmetic information about representations of $\Gal(\Qbar/\Q)$.
Given a ``compatible family'' of $\ell$-adic representations $\rho$ of
$\Gal(\Qbar/\Q)$, one can define an Euler product $L(\rho,s)$, but in
general it is very hard to say anything about the analytic properties
of $L(\rho,s)$.   However, as we saw above, when $\rho$ is attached
to a modular form, we know that $L(\rho,s)$ is entire. 

\begin{theorem}\label{thm:eulerprod}
  Let $f = \sum a_n q^n$ be a newform in $S_k(\Gamma_1(N),\eps)$, and
  let $L(f,s) = \sum_{n\geq 1} a_n n^{-s}$ be the associated Dirichlet
  series.  Then $L(f,s)$ has an Euler product
$$
  L(f,s) = \prod_{p\mid N} \frac{1}{1 - a_p p^{-s}}\cdot
  \prod_{p\nmid N}\frac{1}{1-a_p p^{-s} + \eps(p) p^{k-1}p^{-2s}}.
$$
\end{theorem}
Note that it is not really necessary to separate out the factors with
$p\mid N$ as we have done, since $\eps(p)=0$ whenever $p\mid N$.
Also, note that the denominators are of the form $F(p^{-s})$, where
$$
  F(X)=1-a_p X + \eps(p) p^{k-1}X^2
$$
is the reverse of the characteristic polynomial of
$\Frob_p$ acting on any of the $\ell$-adic representations
attached to~$f$, with $p\neq \ell$.

Recall that if~$p$ is a prime, then for every $r\geq 2$ the Hecke
operators satisfy the relationship
\begin{equation}\label{eqn:hecke_rel}
  T_{p^r} = T_{p^{r-1}} T_p - p^{k-1}\eps(p) T_{p^{r-2}}.
\end{equation}
\begin{lemma}
For every prime~$p$ we have the formal equality
\begin{equation}\label{eqn:tpseries}
  \sum_{r\geq 0} T_{p^r} X^r = \frac{1}{1-T_p X +\eps(p) p^{k-1} X^2}.
\end{equation}
\end{lemma}
\begin{proof}
Multiply both sides of (\ref{eqn:tpseries}) by
$1-T_p X + \eps(p) p^{k-1}X^2$ to obtain the equation
$$
\sum_{r\geq 0} T_{p^r}X^r - \sum_{r\geq 0} (T_{p^r}T_p)X^{r+1} +
\sum_{r\geq 0} (\eps(p) p^{k-1} T_{p^r}) X^{r+2} = 1.
$$
This equation is true if and only if the lemma is true. 
Equality follows by checking the first few terms and shifting the
index down by~$1$ for the second sum and down by~$2$ for the third
sum, then using (\ref{eqn:hecke_rel}).
\end{proof}
Note that $\eps(p)=0$ when $p \mid N$, so when $p\mid N$
$$
  \sum_{r\geq 0} T_{p^r} X^r = \frac{1}{1-T_p X}.
$$

Since the eigenvalues $a_n$ of~$f$ also satisfy (\ref{eqn:hecke_rel}),
we obtain each factor of the Euler product of
Theorem~\ref{thm:eulerprod} by substituting the $a_n$ for the $T_n$
and $p^{-s}$ for~$X$ into (\ref{eqn:hecke_rel}).
For $(n,m)=1$, we have $a_{nm}=a_n a_m$, so 
$$ 
 \sum_{n\geq 1} \frac{a_n}{n^s}
   = \prod_{p} \left(\sum_{r\geq 0} \frac{a_{p^r}}{p^{rs}}\right),
$$
which gives the full Euler product for $L(f,s)=\sum a_n n^{-s}$.

\subsection{Visualizing $L$-function}
A.~Shwayder did his Harvard junior project with me\edit{refine} on
visualizing $L$-functions of elliptic curves (or equivalently, of
newforms $f=\sum a_n q^n \in S_2(\Gamma_0(N))$ with $a_n\in\Z$ for
all~$n$.  The graphs in Figures~\ref{fig:visLreal}--\ref{fig:visLabs}
of $L(E,s)$, for~$s$ real, and $|L(E,s)|$, for~$s$ complex, are from
his paper.

\begin{figure}
\begin{center}

  [[THERE IS A COMMENTED OUT POSTSCRIPT PICTURE -- look at source and
  redo it in Sage]]

% \psset{unit=.9in}
% \begin{pspicture}(-0.5,-1.5)(3,1.5)
% \psgrid[gridcolor=gray]
% \rput(1,1.55){$L$-series}

% % axes
% \psline[linewidth=0.03]{->}(-0.5,0)(3,0)\rput(3.2,0){$x$}
% \psline[linewidth=0.03]{->}(0,-1.5)(0,1.5)\rput(0,1.6){$y$}

% \psline[linecolor=green]
% (0.01999999999999999999999999999,0.01718681534571533496918180083)
% (0.03999999999999999999999999999,0.03444418951606351686559314215)
% (0.05999999999999999999999999999,0.05174966841014516933157250137)
% (0.07999999999999999999999999999,0.06908186280160544819820794758)
% (0.09999999999999999999999999999,0.08642042947681662088512749357)
% (0.1199999999999999999999999999,0.1037460509857430348738013162)
% (0.1399999999999999999999999999,0.1210404141732979373578606002)
% (0.1599999999999999999999999999,0.1382861876488565773070042748)
% (0.1799999999999999999999999999,0.1554669983417954019661080629)
% (0.1999999999999999999999999999,0.1725674072814870642857787885)
% (0.2199999999999999999999999999,0.1895728847310976679516816832)
% (0.2399999999999999999999999999,0.2064697847958068214452788582)
% (0.2599999999999999999999999999,0.2232453196177017933648133222)
% (0.2799999999999999999999999999,0.2398875332615821668632056810)
% (0.2999999999999999999999999999,0.2563852753882475021395242889)
% (0.3199999999999999999999999999,0.2727281748045231994324285658)
% (0.3399999999999999999999999999,0.2889066129723036493196936472)
% (0.3599999999999999999999999999,0.3049116975522506882266018881)
% (0.3799999999999999999999999999,0.3207352360514724657481960818)
% (0.3999999999999999999999999999,0.3363697096385155918461264251)
% (0.4199999999999999999999999999,0.3518082471833238672339377489)
% (0.4399999999999999999999999999,0.3670445995744415805472340298)
% (0.4599999999999999999999999999,0.3820731143606595000144047297)
% (0.4799999999999999999999999999,0.3968887107595082325517903479)
% (0.5000000000000000000000000000,0.4114868550704872899333574729)
% (0.5199999999999999999999999999,0.4258635365266695524939245790)
% (0.5399999999999999999999999999,0.4400152436143303139560179694)
% (0.5599999999999999999999999999,0.4539389408865081287951249319)
% (0.5799999999999999999999999999,0.4676320462929016562827460722)
% (0.5999999999999999999999999999,0.4810924090452330202713752181)
% (0.6199999999999999999999999999,0.4943182880341543604186906474)
% (0.6400000000000000000000000000,0.5073083308109308118609439960)
% (0.6600000000000000000000000000,0.5200615531444908104381963017)
% (0.6800000000000000000000000000,0.5325773191619842190133578282)
% (0.6999999999999999999999999999,0.5448553220787213134989496874)
% (0.7200000000000000000000000000,0.5568955655212723463175697575)
% (0.7400000000000000000000000000,0.5686983454455796124749047414)
% (0.7600000000000000000000000000,0.5802642326501632857618388233)
% (0.7800000000000000000000000000,0.5915940558828806017375856849)
% (0.8000000000000000000000000000,0.6026888855382173064467543532)
% (0.8200000000000000000000000000,0.6135500179407429733349907894)
% (0.8400000000000000000000000000,0.6241789602091403707947075776)
% (0.8600000000000000000000000000,0.6345774156941163456142179008)
% (0.8800000000000000000000000000,0.6447472699825107334901933087)
% (0.9000000000000000000000000000,0.6546905774590339319229932763)
% (0.9200000000000000000000000000,0.6644095484162765437017544146)
% (0.9400000000000000000000000000,0.6739065367029397456279240413)
% (0.9600000000000000000000000000,0.6831840278996268345536515145)
% (0.9800000000000000000000000000,0.6922446280110090786829061099)
% (1.000000000000000000000000000,0.7010910526627271305875095398)
% (1.020000000000000000000000000,0.7097261167910076565239347125)
% (1.040000000000000000000000000,0.7181527248126585597314789803)
% (1.060000000000000000000000000,0.7263738612628505121698431233)
% (1.080000000000000000000000000,0.7343925818878929763756258124)
% (1.100000000000000000000000000,0.7422120051800652358926536927)
% (1.120000000000000000000000000,0.7498353043414631145441271942)
% (1.140000000000000000000000000,0.7572656996637662173179415238)
% (1.160000000000000000000000000,0.7645064513108150382651756859)
% (1.180000000000000000000000000,0.7715608524909087202584474283)
% (1.200000000000000000000000000,0.7784322230057893750502702092)
% (1.220000000000000000000000000,0.7851239031633646210927646777)
% (1.240000000000000000000000000,0.7916392480413334895503044088)
% (1.260000000000000000000000000,0.7979816220890193749057787873)
% (1.280000000000000000000000000,0.8041543940548747184230133856)
% (1.300000000000000000000000000,0.8101609322273032205861412028)
% (1.320000000000000000000000000,0.8160045999766443432416647033)
% (1.340000000000000000000000000,0.8216887515863795884438963795)
% (1.360000000000000000000000000,0.8272167283618485716775831989)
% (1.380000000000000000000000000,0.8325918550050034164871259150)
% (1.400000000000000000000000000,0.8378174362439807853030944270)
% (1.420000000000000000000000000,0.8428967537065303466101841214)
% (1.440000000000000000000000000,0.8478330630266051943707462961)
% (1.460000000000000000000000000,0.8526295911736923225988731765)
% (1.480000000000000000000000000,0.8572895339947384594310477314)
% (1.500000000000000000000000000,0.8618160539588072213475651896)
% (1.520000000000000000000000000,0.8662122780948865917125199484)
% (1.540000000000000000000000000,0.8704812961135501778354210042)
% (1.560000000000000000000000000,0.8746261587034606587803018492)
% (1.580000000000000000000000000,0.8786498759939884811306534807)
% (1.600000000000000000000000000,0.8825554161755024438708025645)
% (1.620000000000000000000000000,0.8863457042691706572206704566)
% (1.640000000000000000000000000,0.8900236210383898490381316271)
% (1.660000000000000000000000000,0.8935920020342375723306921073)
% (1.680000000000000000000000000,0.8970536367676150414353971752)
% (1.700000000000000000000000000,0.9004112680010176487458960935)
% (1.720000000000000000000000000,0.9036675911531352945210824755)
% (1.740000000000000000000000000,0.9068252538097451518575367410)
% (1.760000000000000000000000000,0.9098868553346150832890219622)
% (1.780000000000000000000000000,0.9128549465743863610265316789)
% (1.800000000000000000000000000,0.9157320296516493934610968850)
% (1.820000000000000000000000000,0.9185205578406656349621433238)
% (1.840000000000000000000000000,0.9212229355204225952536227502)
% (1.860000000000000000000000000,0.9238415181999367396423325301)
% (1.880000000000000000000000000,0.9263786126109409805814968830)
% (1.900000000000000000000000000,0.9288364768633093283491385600)
% (1.920000000000000000000000000,0.9312173206587810412221944903)
% (1.940000000000000000000000000,0.9335233055587502620608413631)
% (1.960000000000000000000000000,0.9357565453020846368956280639)
% (1.980000000000000000000000000,0.9379191061691277880130715350)
% (2.000000000000000000000000000,0.9400130073882257814963021214)
% (2.020000000000000000000000000,0.9420402215812969242647099595)
% (2.040000000000000000000000000,0.9440026752451373987513945643)
% (2.060000000000000000000000000,0.9459022492653224568196330320)
% (2.080000000000000000000000000,0.9477407794597242214407911249)
% (2.100000000000000000000000000,0.9495200571488226676922162200)
% (2.120000000000000000000000000,0.9512418297501361649170761909)
% (2.140000000000000000000000000,0.9529078013942421580128722224)
% (2.160000000000000000000000000,0.9545196335599972528926752815)
% (2.180000000000000000000000000,0.9560789457266992599436673580)
% (2.200000000000000000000000000,0.9575873160410617553668666970)
% (2.220000000000000000000000000,0.9590462819969945632658160834)
% (2.240000000000000000000000000,0.9604573411263013642786885482)
% (2.260000000000000000000000000,0.9618219516985185251638818473)
% (2.280000000000000000000000000,0.9631415334282273459341585496)
% (2.300000000000000000000000000,0.9644174681882753663574502411)
% (2.320000000000000000000000000,0.9656511007274412924595954006)
% (2.340000000000000000000000000,0.9668437393911726272602342846)
% (2.360000000000000000000000000,0.9679966568441153497424961906)
% (2.380000000000000000000000000,0.9691110907932411132232581627)
% (2.400000000000000000000000000,0.9701882447104595595593245443)
% (2.420000000000000000000000000,0.9712292885536815988707203537)
% (2.440000000000000000000000000,0.9722353594853740144469640266)
% (2.460000000000000000000000000,0.9732075625877166466203370990)
% (2.480000000000000000000000000,0.9741469715735408134428558314)
% (2.500000000000000000000000000,0.9750546294922916639967612353)
% (2.520000000000000000000000000,0.9759315494303179541344264483)
% (2.540000000000000000000000000,0.9767787152048504042854336739)
% (2.560000000000000000000000000,0.9775970820510844623230674031)
% (2.580000000000000000000000000,0.9783875773018350666031262487)
% (2.600000000000000000000000000,0.9791511010592799979448971263)
% (2.620000000000000000000000000,0.9798885268583547347201162044)
% (2.640000000000000000000000000,0.9806007023214054899170009741)
% (2.660000000000000000000000000,0.9812884498037484179272296000)
% (2.680000000000000000000000000,0.9819525670298219340034298152)
% (2.700000000000000000000000000,0.9825938277196557902264266074)
% (2.720000000000000000000000000,0.9832129822054150949912363593)
% (2.740000000000000000000000000,0.9838107580378099422564315965)
% (2.760000000000000000000000000,0.9843878605821918230903250927)
% (2.780000000000000000000000000,0.9849449736041866135818074281)
% (2.800000000000000000000000000,0.9854827598447407553739519456)
% (2.820000000000000000000000000,0.9860018615844823505723843165)
% (2.840000000000000000000000000,0.9865029011973223614882763875)
% (2.860000000000000000000000000,0.9869864816932430148012639218)
% (2.880000000000000000000000000,0.9874531872502409338026732446)
% (2.900000000000000000000000000,0.9879035837354115333041163899)
% (2.920000000000000000000000000,0.9883382192151788788816671071)
% (2.940000000000000000000000000,0.9887576244546916021395682079)
% (2.960000000000000000000000000,0.9891623134064206408941194847)
% (2.980000000000000000000000000,0.9895527836880085994301301208)
% (3.000000000000000000000000000,0.9899295170494334587123143226)
   
% \psline[linecolor=blue]
% (0.01999999999999999999999999999,-0.007040682645273880424414896490)
% (0.03999999999999999999999999999,-0.01384879340673429562897025802)
% (0.05999999999999999999999999999,-0.02041151906125685194786353569)
% (0.07999999999999999999999999999,-0.02671717089639622967868548846)
% (0.09999999999999999999999999999,-0.03275514877468835667228254248)
% (0.1199999999999999999999999999,-0.03851590459515947560090356606)
% (0.1399999999999999999999999999,-0.04399090531018095579842531960)
% (0.1599999999999999999999999999,-0.04917259564426959043634517837)
% (0.1799999999999999999999999999,-0.05405436065038169549825383245)
% (0.1999999999999999999999999999,-0.05863048822868273853342317371)
% (0.2199999999999999999999999999,-0.06289613172268792282287897432)
% (0.2399999999999999999999999999,-0.06684727269805707901875306754)
% (0.2599999999999999999999999999,-0.07048068400018198510490385939)
% (0.2799999999999999999999999999,-0.07379389317801729705702480679)
% (0.2999999999999999999999999999,-0.07678514635336806772315486764)
% (0.3199999999999999999999999999,-0.07945337260704693367480853604)
% (0.3399999999999999999999999999,-0.08179814894594129630869963056)
% (0.3599999999999999999999999999,-0.08381966590807343598837635362)
% (0.3799999999999999999999999999,-0.08551869385618219352561940146)
% (0.3999999999999999999999999999,-0.08689655000419094575245607525)
% (0.4199999999999999999999999999,-0.08795506621514009498707863136)
% (0.4399999999999999999999999999,-0.08869655760373996378059430584)
% (0.4599999999999999999999999999,-0.08912379197162846543221041580)
% (0.4799999999999999999999999999,-0.08923996009868375692678919869)
% (0.5000000000000000000000000000,-0.08904864690933180697948009138)
% (0.5199999999999999999999999999,-0.08855380352868900012719369984)
% (0.5399999999999999999999999999,-0.08775972023957721056568979875)
% (0.5599999999999999999999999999,-0.08667100034793001370606707268)
% (0.5799999999999999999999999999,-0.08529253496086083061378244649)
% (0.5999999999999999999999999999,-0.08362947867867400124606939994)
% (0.6199999999999999999999999999,-0.08168722619935547704606842491)
% (0.6400000000000000000000000000,-0.07947138983156869830977112899)
% (0.6600000000000000000000000000,-0.07698777790989125167415357936)
% (0.6800000000000000000000000000,-0.07424237410394737051996840888)
% (0.6999999999999999999999999999,-0.07124131761120885189838824192)
% (0.7200000000000000000000000000,-0.06799088422154145995628282789)
% (0.7400000000000000000000000000,-0.06449746824005465646627421466)
% (0.7600000000000000000000000000,-0.06076756525345918698261559700)
% (0.7800000000000000000000000000,-0.05680775572393965919941740744)
% (0.8000000000000000000000000000,-0.05262468939349814449812226300)
% (0.8200000000000000000000000000,-0.04822507048081074570172472194)
% (0.8400000000000000000000000000,-0.04361564365185310007207290383)
% (0.8600000000000000000000000000,-0.03880318074488438664428006043)
% (0.8800000000000000000000000000,-0.03379446822982440208845599349)
% (0.9000000000000000000000000000,-0.02859629538160683747275401029)
% (0.9200000000000000000000000000,-0.02321544314673655974290269603)
% (0.9400000000000000000000000000,-0.01765867368201235289112268235)
% (0.9600000000000000000000000000,-0.01193272054419242079363246703)
% (0.9800000000000000000000000000,-0.006044279509271545062101302395)
% (1.000000000000000000000000000,0)
% (1.020000000000000000000000000,0.006193522899700657948953702821)
% (1.040000000000000000000000000,0.01252975586468649046170633195)
% (1.060000000000000000000000000,0.01900223420402991510662878509)
% (1.080000000000000000000000000,0.02560456821288883018732881229)
% (1.100000000000000000000000000,0.03233044902151853285873105062)
% (1.120000000000000000000000000,0.03917365396187151515130066257)
% (1.140000000000000000000000000,0.04612805147192782966336624274)
% (1.160000000000000000000000000,0.05318760555756510911394608809)
% (1.180000000000000000000000000,0.06034637983141611780977478710)
% (1.200000000000000000000000000,0.06759854114777629370830779932)
% (1.220000000000000000000000000,0.07493836285221727134548049211)
% (1.240000000000000000000000000,0.08236022766413781101477395164)
% (1.260000000000000000000000000,0.08985863021004364857227589662)
% (1.280000000000000000000000000,0.09742817922489508043562107831)
% (1.300000000000000000000000000,0.1050635994383979831195623428)
% (1.320000000000000000000000000,0.1127597331626426342750000402)
% (1.340000000000000000000000000,0.1205115415970171844667067337)
% (1.360000000000000000000000000,0.1283141058658407995725197568)
% (1.380000000000000000000000000,0.1361626278036770765653872408)
% (1.400000000000000000000000000,0.1440524305028029124532985236)
% (1.420000000000000000000000000,0.1519789586368230249427400150)
% (1.440000000000000000000000000,0.1599377785739371047713213740)
% (1.460000000000000000000000000,0.1679245782928863247835066101)
% (1.480000000000000000000000000,0.1759351671141297281229851813)
% (1.500000000000000000000000000,0.1839654752583298497321186624)
% (1.520000000000000000000000000,0.1920115532437616743525970716)
% (1.540000000000000000000000000,0.2000695711338004895487135877)
% (1.560000000000000000000000000,0.2081358176451930554189518053)
% (1.580000000000000000000000000,0.2162066991273734031110841806)
% (1.600000000000000000000000000,0.2242787384226500348843475940)
% (1.620000000000000000000000000,0.2323485736166658006761623977)
% (1.640000000000000000000000000,0.2404129566881156747794000563)
% (1.660000000000000000000000000,0.2484687520663013942874635967)
% (1.680000000000000000000000000,0.2565129351047057339548403668)
% (1.700000000000000000000000000,0.2645425904783833123832212255)
% (1.720000000000000000000000000,0.2725549105125894351203245871)
% (1.740000000000000000000000000,0.2805471934497037191070854782)
% (1.760000000000000000000000000,0.2885168416611512059026883501)
% (1.780000000000000000000000000,0.2964613598106804158541689015)
% (1.800000000000000000000000000,0.3043783529750253442992429567)
% (1.820000000000000000000000000,0.3122655247276567443190829145)
% (1.840000000000000000000000000,0.3201206751910171395556735942)
% (1.860000000000000000000000000,0.3279416990623337996760249098)
% (1.880000000000000000000000000,0.3357265836178143006713637220)
% (1.900000000000000000000000000,0.3434734066997501711381013130)
% (1.920000000000000000000000000,0.3511803346907853633889956286)
% (1.940000000000000000000000000,0.3588456204793477367406288223)
% (1.960000000000000000000000000,0.3664676014199932362853021491)
% (1.980000000000000000000000000,0.3740446972921738169877932115)
% (2.000000000000000000000000000,0.3815754082607112112937104095)
% (2.020000000000000000000000000,0.3890583128410391695598633238)
% (2.040000000000000000000000000,0.3964920658720666086723007354)
% (2.060000000000000000000000000,0.4038753964993129699142493503)
% (2.080000000000000000000000000,0.4112071061707747910139988429)
% (2.100000000000000000000000000,0.4184860666477988128610003466)
% (2.120000000000000000000000000,0.4257112180330616382145949304)
% (2.140000000000000000000000000,0.4328815668175888044935202098)
% (2.160000000000000000000000000,0.4399961839485868900507079621)
% (2.180000000000000000000000000,0.4470542029197107066446098109)
% (2.200000000000000000000000000,0.4540548178852435031314417493)
% (2.220000000000000000000000000,0.4609972817995311800149907190)
% (2.240000000000000000000000000,0.4678809045828815556061141898)
% (2.260000000000000000000000000,0.4747050513150164978537264130)
% (2.280000000000000000000000000,0.4814691404570480091101373545)
% (2.300000000000000000000000000,0.4881726421028388943567929956)
% (2.320000000000000000000000000,0.4948150762605042298041400070)
% (2.340000000000000000000000000,0.5013960111647112546180296503)
% (2.360000000000000000000000000,0.5079150616203423137352231886)
% (2.380000000000000000000000000,0.5143718873779978681164907961)
% (2.400000000000000000000000000,0.5207661915417341482886693073)
% (2.420000000000000000000000000,0.5270977190093525499433942425)
% (2.440000000000000000000000000,0.5333662549454851535285664326)
% (2.460000000000000000000000000,0.5395716232876525947265009191)
% (2.480000000000000000000000000,0.5457136852854067258264170737)
% (2.500000000000000000000000000,0.5517923380726109005679500842)
% (2.520000000000000000000000000,0.5578075132728551033706124653)
% (2.540000000000000000000000000,0.5637591756379513493598187888)
% (2.560000000000000000000000000,0.5696473217194066307559695957)
% (2.580000000000000000000000000,0.5754719785727260096488165877)
% (2.600000000000000000000000000,0.5812332024943570937173917601)
% (2.620000000000000000000000000,0.5869310777910489219925825373)
% (2.640000000000000000000000000,0.5925657155813630793228431299)
% (2.660000000000000000000000000,0.5981372526290425028982153542)
% (2.680000000000000000000000000,0.6036458502079137991495723328)
% (2.700000000000000000000000000,0.6090916929979718166801361655)
% (2.720000000000000000000000000,0.6144749880122705876273751187)
% (2.740000000000000000000000000,0.6197959635542224278568417655)
% (2.760000000000000000000000000,0.6250548682048868522766910655)
% (2.780000000000000000000000000,0.6302519698398128966284810703)
% (2.800000000000000000000000000,0.6353875546749823272365581299)
% (2.820000000000000000000000000,0.6404619263413869557542058624)
% (2.840000000000000000000000000,0.6454754049877607516894869008)
% (2.860000000000000000000000000,0.6504283264109765604753116705)
% (2.880000000000000000000000000,0.6553210412136078922982997797)
% (2.900000000000000000000000000,0.6601539139881483541278100795)
% (2.920000000000000000000000000,0.6649273225273747656668244570)
% (2.940000000000000000000000000,0.6696416570603347444156881135)
% (2.960000000000000000000000000,0.6742973195134354845820148258)
% (2.980000000000000000000000000,0.6788947227961075117071180513)
% (3.000000000000000000000000000,0.6834342901105152956599508217)

% \psline[linecolor=cyan]
% (0.01999999999999999999999999999,0.06633205232924863831021756275)
% (0.03999999999999999999999999999,0.1238589869993040262250816535)
% (0.05999999999999999999999999999,0.1732490974204031901524233845)
% (0.07999999999999999999999999999,0.2151452257836850350849844517)
% (0.09999999999999999999999999999,0.2501634032128948577781162685)
% (0.1199999999999999999999999999,0.2788918829395867975266200164)
% (0.1399999999999999999999999999,0.3018905175888066893166510691)
% (0.1599999999999999999999999999,0.3196904360975578975797463927)
% (0.1799999999999999999999999999,0.3327939799261070683793316003)
% (0.1999999999999999999999999999,0.3416748620723204017123107521)
% (0.2199999999999999999999999999,0.3467785159727270810670498189)
% (0.2399999999999999999999999999,0.3485226046826493404029088088)
% (0.2599999999999999999999999999,0.3472976637838162485768392706)
% (0.2799999999999999999999999999,0.3434678542840188216894816108)
% (0.2999999999999999999999999999,0.3373718043623533659424285446)
% (0.3199999999999999999999999999,0.3293235211882361546026495165)
% (0.3399999999999999999999999999,0.3196133562153448294365761606)
% (0.3599999999999999999999999999,0.3085090093354303941233055163)
% (0.3799999999999999999999999999,0.2962565590837378578062775966)
% (0.3999999999999999999999999999,0.2830815077294071810755392342)
% (0.4199999999999999999999999999,0.2691898315721259382198436763)
% (0.4399999999999999999999999999,0.2547690281114520602682614897)
% (0.4599999999999999999999999999,0.2399891529681262198170412718)
% (0.4799999999999999999999999999,0.2250038405273628209988407423)
% (0.5000000000000000000000000000,0.2099513032520556529211768679)
% (0.5199999999999999999999999999,0.1949553054880592575852744770)
% (0.5399999999999999999999999999,0.1801261083627015878193116810)
% (0.5599999999999999999999999999,0.1655613830694359537456005338)
% (0.5799999999999999999999999999,0.1513470904435447588671322255)
% (0.5999999999999999999999999999,0.1375583252730762514803768786)
% (0.6199999999999999999999999999,0.1242601242622731563050750119)
% (0.6400000000000000000000000000,0.1115082369777323362159891224)
% (0.6600000000000000000000000000,0.09934985946607825450425559998)
% (0.6800000000000000000000000000,0.08782433054128655920915869191)
% (0.6999999999999999999999999999,0.07696379100480972080761890705)
% (0.7200000000000000000000000000,0.06679380628681199812990246179)
% (0.7400000000000000000000000000,0.05733395318623945854793812367)
% (0.7600000000000000000000000000,0.04859837154492148960574052244)
% (0.7800000000000000000000000000,0.04059628181989797667737901674)
% (0.8000000000000000000000000000,0.03333246962187091404798015893)
% (0.8200000000000000000000000000,0.02680773836899450420488153651)
% (0.8400000000000000000000000000,0.02101933126678998630035469414)
% (0.8600000000000000000000000000,0.01596132386920678110544201227)
% (0.8800000000000000000000000000,0.01162498850493334187192106899)
% (0.9000000000000000000000000000,0.007999131868965912642441395577)
% (0.9200000000000000000000000000,0.005070407083956478888872728231)
% (0.9400000000000000000000000000,0.002823601530591176909816049109)
% (0.9600000000000000000000000000,0.001241901732643167124218419275)
% (0.9800000000000000000000000000,0.0003071365616956409405041744633)
% (1.000000000000000000000000000,0)
% (1.020000000000000000000000000,0.0003002546685542481584883817277)
% (1.040000000000000000000000000,0.001186917292175145886470395270)
% (1.060000000000000000000000000,0.002638427234907597995192163478)
% (1.080000000000000000000000000,0.004632799198283402720258234366)
% (1.100000000000000000000000000,0.007147761132339355951297819566)
% (1.120000000000000000000000000,0.01016087836548349682017904803)
% (1.140000000000000000000000000,0.01364966491473845803352122823)
% (1.160000000000000000000000000,0.01759168289300856828113180647)
% (1.180000000000000000000000000,0.02196463088517071480962718469)
% (1.200000000000000000000000000,0.02674642212028410492580900504)
% (1.220000000000000000000000000,0.03191525322331037831235999896)
% (1.240000000000000000000000000,0.03744966428665069684926975382)
% (1.260000000000000000000000000,0.04332859095972094819532206158)
% (1.280000000000000000000000000,0.04953140921384744528365415091)
% (1.300000000000000000000000000,0.05603797340009158542754001716)
% (1.320000000000000000000000000,0.06282864817929507627563652885)
% (1.340000000000000000000000000,0.06988433486674700883909261771)
% (1.360000000000000000000000000,0.07718649269845979080186917044)
% (1.380000000000000000000000000,0.08471715549213489220344650360)
% (1.400000000000000000000000000,0.09245894414351856480180224416)
% (1.420000000000000000000000000,0.1003950753679962330352313589)
% (1.440000000000000000000000000,0.1085093670679450315037515450)
% (1.460000000000000000000000000,0.1167862406785404202910496723)
% (1.480000000000000000000000000,0.1252107208183704033015454849)
% (1.500000000000000000000000000,0.1337684325463184144182903735)
% (1.520000000000000000000000000,0.1424455965026967638450474248)
% (1.540000000000000000000000000,0.1512290221905055775109462058)
% (1.560000000000000000000000000,0.1601060996319128505769381796)
% (1.580000000000000000000000000,0.1690647896155523320460112270)
% (1.600000000000000000000000000,0.1780936127319682621754391509)
% (1.620000000000000000000000000,0.1871816373774489639875751267)
% (1.640000000000000000000000000,0.1963184668905336185903967618)
% (1.660000000000000000000000000,0.2054942259705965816493012890)
% (1.680000000000000000000000000,0.2146995465140597545581439636)
% (1.700000000000000000000000000,0.2239255529909046600601038464)
% (1.720000000000000000000000000,0.2331638474722015517620026003)
% (1.740000000000000000000000000,0.2424064944082936284211799523)
% (1.760000000000000000000000000,0.2516460052470219006656846127)
% (1.780000000000000000000000000,0.2608753229719034621687023556)
% (1.800000000000000000000000000,0.2700878066314372903924979781)
% (1.820000000000000000000000000,0.2792772159226632351689109758)
% (1.840000000000000000000000000,0.2884376958846991638357231880)
% (1.860000000000000000000000000,0.2975637617511876160398143306)
% (1.880000000000000000000000000,0.3066502840043577897819130821)
% (1.900000000000000000000000000,0.3156924736677139737711561023)
% (1.920000000000000000000000000,0.3246858678691621343664513934)
% (1.940000000000000000000000000,0.3336263157016484572980805859)
% (1.960000000000000000000000000,0.3425099644040751384131523910)
% (1.980000000000000000000000000,0.3513332458813491930824106960)
% (2.000000000000000000000000000,0.3600928635788807296980040920)
% (2.020000000000000000000000000,0.3687857797236508258718531647)
% (2.040000000000000000000000000,0.3774092029410902247245086278)
% (2.060000000000000000000000000,0.3859605762544244019818914223)
% (2.080000000000000000000000000,0.3944375654708254587933895777)
% (2.100000000000000000000000000,0.4028380479566454785017768724)
% (2.120000000000000000000000000,0.4111601018021694913778216111)
% (2.140000000000000000000000000,0.4194019953747003403784799398)
% (2.160000000000000000000000000,0.4275621772573550736243327165)
% (2.180000000000000000000000000,0.4356392665696967076039051483)
% (2.200000000000000000000000000,0.4436320436652311156968651002)
% (2.220000000000000000000000000,0.4515394411998522541716632602)
% (2.240000000000000000000000000,0.4593605355645067898736147499)
% (2.260000000000000000000000000,0.4670945386746592267266241759)
% (2.280000000000000000000000000,0.4747407901085595146246071222)
% (2.300000000000000000000000000,0.4822987495858363724860086952)
% (2.320000000000000000000000000,0.4897679897775514617778094699)
% (2.340000000000000000000000000,0.4971481894385431413804738794)
% (2.360000000000000000000000000,0.5044391268526555466528667942)
% (2.380000000000000000000000000,0.5116406735812815425491346379)
% (2.400000000000000000000000000,0.5187527885055396888373777886)
% (2.420000000000000000000000000,0.5257755121523492800387175090)
% (2.440000000000000000000000000,0.5327089612946578700408722419)
% (2.460000000000000000000000000,0.5395533238161070432200454270)
% (2.480000000000000000000000000,0.5463088538304895934951863330)
% (2.500000000000000000000000000,0.5529758670464501924162602402)
% (2.520000000000000000000000000,0.5595547363680079383280405544)
% (2.540000000000000000000000000,0.5660458877216291221281075280)
% (2.560000000000000000000000000,0.5724497961007487054862753885)
% (2.580000000000000000000000000,0.5787669818188262865625489756)
% (2.600000000000000000000000000,0.5849980069622239219107713778)
% (2.620000000000000000000000000,0.5911434720344065483191188197)
% (2.640000000000000000000000000,0.5972040127831886220005883782)
% (2.660000000000000000000000000,0.6031802972029809125617581586)
% (2.680000000000000000000000000,0.6090730227042273154751206094)
% (2.700000000000000000000000000,0.6148829134424614342827547772)
% (2.720000000000000000000000000,0.6206107177996550663633346026)
% (2.740000000000000000000000000,0.6262572060107743017435208269)
% (2.760000000000000000000000000,0.6318231679287025612292137093)
% (2.780000000000000000000000000,0.6373094109209325434200891978)
% (2.800000000000000000000000000,0.6427167578916698305616933645)
% (2.820000000000000000000000000,0.6480460454232290454373140670)
% (2.840000000000000000000000000,0.6532981220308382842075416019)
% (2.860000000000000000000000000,0.6584738465251984961861606039)
% (2.880000000000000000000000000,0.6635740864773710494218020169)
% (2.900000000000000000000000000,0.6685997167807884964349752979)
% (2.920000000000000000000000000,0.6735516183054001932121618872)
% (2.940000000000000000000000000,0.6784306766391756452179075042)
% (2.960000000000000000000000000,0.6832377809123940319920346023)
% (2.980000000000000000000000000,0.6879738227003481228525514787)
% (3.000000000000000000000000000,0.6926396950002846117222293821)

% \psline[linecolor=magenta]
% (0.01999999999999999999999999999,-0.6941969565423001064579008505)
% (0.03999999999999999999999999999,-1.224303060054913888228611661)
% (0.05999999999999999999999999999,-1.617036990043072476380405432)
% (0.07999999999999999999999999999,-1.895599825260420064276982232)
% (0.09999999999999999999999999999,-2.080058567173062689443317490)
% (0.1199999999999999999999999999,-2.187697375097209442807822069)
% (0.1399999999999999999999999999,-2.233337785910732953117521202)
% (0.1599999999999999999999999999,-2.229629434932846597202591093)
% (0.1799999999999999999999999999,-2.187312956336142367783540870)
% (0.1999999999999999999999999999,-2.115456837327142818018141335)
% (0.2199999999999999999999999999,-2.021670043781688359424560791)
% (0.2399999999999999999999999999,-1.912292237330765763733304833)
% (0.2599999999999999999999999999,-1.792563374456563069666298951)
% (0.2799999999999999999999999999,-1.666774424759994937314205875)
% (0.2999999999999999999999999999,-1.538400874605764615403251437)
% (0.3199999999999999999999999999,-1.410220599075322086377357005)
% (0.3399999999999999999999999999,-1.284417593807022454714262376)
% (0.3599999999999999999999999999,-1.162672962285572963824604544)
% (0.3799999999999999999999999999,-1.046244456166366802310495314)
% (0.3999999999999999999999999999,-0.9360357684041337897681360899)
% (0.4199999999999999999999999999,-0.8326566829304489846775894104)
% (0.4399999999999999999999999999,-0.7364750916176941703400764989)
% (0.4599999999999999999999999999,-0.6476618001723166913083888297)
% (0.4799999999999999999999999999,-0.5662289600405636110221516461)
% (0.5000000000000000000000000000,-0.4920628837884663767162722526)
% (0.5199999999999999999999999999,-0.4249519269617209726671399220)
% (0.5399999999999999999999999999,-0.3646100502276295382286701887)
% (0.5599999999999999999999999999,-0.3106966116287169800938014682)
% (0.5799999999999999999999999999,-0.2628328799305563687087769934)
% (0.5999999999999999999999999999,-0.2206157061565192332634880189)
% (0.6199999999999999999999999999,-0.1836287412558685910948819996)
% (0.6400000000000000000000000000,-0.1514515432036038941355468859)
% (0.6600000000000000000000000000,-0.1236668764153878637362459807)
% (0.6800000000000000000000000000,-0.09986646990233779653602125192)
% (0.6999999999999999999999999999,-0.07965546780820809922285492823)
% (0.7200000000000000000000000000,-0.06265577658705412018384921392)
% (0.7400000000000000000000000000,-0.04850848682044001416921755886)
% (0.7600000000000000000000000000,-0.03687552427649674769076936318)
% (0.7800000000000000000000000000,-0.02744066402710006863491442098)
% (0.8000000000000000000000000000,-0.01991002302575148987446085203)
% (0.8200000000000000000000000000,-0.01401213028322172326308234058)
% (0.8400000000000000000000000000,-0.009497659451189876915738041398)
% (0.8600000000000000000000000000,-0.006138896041403990484653390642)
% (0.8800000000000000000000000000,-0.003729000489484266274466262582)
% (0.9000000000000000000000000000,-0.002081118652996614152056766787)
% (0.9200000000000000000000000000,-0.001027382961363314017406494273)
% (0.9400000000000000000000000000,-0.0004178401723634765122120044597)
% (0.9600000000000000000000000000,-0.0001193354108090775330798550141)
% (0.9800000000000000000000000000,-0.00001437675569523539982970834126)
% (1.000000000000000000000000000,0)
% (1.020000000000000000000000000,0.00001335076010323709396208854362)
% (1.040000000000000000000000000,0.0001029144255272643359860796470)
% (1.060000000000000000000000000,0.0003346666611260519448020428584)
% (1.080000000000000000000000000,0.0007643291131354103068160924266)
% (1.100000000000000000000000000,0.001438329075870453641136902059)
% (1.120000000000000000000000000,0.002394706281075908365750437174)
% (1.140000000000000000000000000,0.003663964864451018058842766187)
% (1.160000000000000000000000000,0.005269869692308771884970831179)
% (1.180000000000000000000000000,0.007230187143107076178798332141)
% (1.200000000000000000000000000,0.009557371165349786145716519883)
% (1.220000000000000000000000000,0.01225919600281414307728846704)
% (1.240000000000000000000000000,0.01533933741442756779897108478)
% (1.260000000000000000000000000,0.01879790454047723887660114808)
% (1.280000000000000000000000000,0.02263192479750214967619458858)
% (1.300000000000000000000000000,0.02683578433704244666524467576)
% (1.320000000000000000000000000,0.03140162669208463969482120891)
% (1.340000000000000000000000000,0.03631971227130751156193470885)
% (1.360000000000000000000000000,0.04157874135518094727701674422)
% (1.380000000000000000000000000,0.04716614320819906972809900905)
% (1.400000000000000000000000000,0.05306833385534747781079476116)
% (1.420000000000000000000000000,0.05927094498449120520526767588)
% (1.440000000000000000000000000,0.06575902633492268847102645806)
% (1.460000000000000000000000000,0.07251722382017324802586003591)
% (1.480000000000000000000000000,0.07952993551397631749826337090)
% (1.500000000000000000000000000,0.08678144750494967257462341313)
% (1.520000000000000000000000000,0.09425605150056515587276714319)
% (1.540000000000000000000000000,0.1019381459362585051211530930)
% (1.560000000000000000000000000,0.1098123222226609793674436171)
% (1.580000000000000000000000000,0.1178634376441322427302334033)
% (1.600000000000000000000000000,0.1260766763059780939693254887)
% (1.620000000000000000000000000,0.1344375994166443422785904058)
% (1.640000000000000000000000000,0.1429321860852856580248726532)
% (1.660000000000000000000000000,0.1515468657147449390448351677)
% (1.680000000000000000000000000,0.1602685429753365274249350349)
% (1.700000000000000000000000000,0.1690846162559851612628322842)
% (1.720000000000000000000000000,0.1779829904062208953656092390)
% (1.740000000000000000000000000,0.1869520845051851986279852277)
% (1.760000000000000000000000000,0.1959808353220252615207756937)
% (1.780000000000000000000000000,0.2050586970656590537713607681)
% (1.800000000000000000000000000,0.2141756379606673828509888437)
% (1.820000000000000000000000000,0.2233221341297726034172697453)
% (1.840000000000000000000000000,0.2324891612117428568921548218)
% (1.860000000000000000000000000,0.2416681840963529118286738355)
% (1.880000000000000000000000000,0.2508511451149711283894650525)
% (1.900000000000000000000000000,0.2600304509861604269868339229)
% (1.920000000000000000000000000,0.2691989587801167195171382618)
% (1.940000000000000000000000000,0.2783499611335646655554892373)
% (1.960000000000000000000000000,0.2874771709176397398850025740)
% (1.980000000000000000000000000,0.2965747055350691211609569031)
% (2.000000000000000000000000000,0.3056370709993943665549003166)
% (2.020000000000000000000000000,0.3146591459278403233288422136)
% (2.040000000000000000000000000,0.3236361655605233352311955711)
% (2.060000000000000000000000000,0.3325637059018157947808852386)
% (2.080000000000000000000000000,0.3414376680646639061197502741)
% (2.100000000000000000000000000,0.3502542628853236001868016155)
% (2.120000000000000000000000000,0.3590099958641800561590573025)
% (2.140000000000000000000000000,0.3677016524779047582002084146)
% (2.160000000000000000000000000,0.3763262838990468970337686712)
% (2.180000000000000000000000000,0.3848811931511300780276354433)
% (2.200000000000000000000000000,0.3933639217203174874682380442)
% (2.220000000000000000000000000,0.4017722366386150185801703062)
% (2.240000000000000000000000000,0.4101041180483072938071798599)
% (2.260000000000000000000000000,0.4183577472527792152975220295)
% (2.280000000000000000000000000,0.4265314952549865109567053478)
% (2.300000000000000000000000000,0.4346239117815307688696096270)
% (2.320000000000000000000000000,0.4426337147875023718864778732)
% (2.340000000000000000000000000,0.4505597804349194165848217499)
% (2.360000000000000000000000000,0.4584011335356586677964917621)
% (2.380000000000000000000000000,0.4661569384481976323856783780)
% (2.400000000000000000000000000,0.4738264904162215078882895996)
% (2.420000000000000000000000000,0.4814092073361560479497626593)
% (2.440000000000000000000000000,0.4889046219399322863990937908)
% (2.460000000000000000000000000,0.4963123743787402464988274434)
% (2.480000000000000000000000000,0.5036322051931582467284077354)
% (2.500000000000000000000000000,0.5108639486548272542604836536)
% (2.520000000000000000000000000,0.5180075264647537445144708387)
% (2.540000000000000000000000000,0.5250629417933500093972620327)
% (2.560000000000000000000000000,0.5320302736474403848513098340)
% (2.580000000000000000000000000,0.5389096715496600435683203816)
% (2.600000000000000000000000000,0.5457013505159362590105184873)
% (2.620000000000000000000000000,0.5524055863170584792543541452)
% (2.640000000000000000000000000,0.5590227110107027207717825134)
% (2.660000000000000000000000000,0.5655531087306685961213413424)
% (2.680000000000000000000000000,0.5719972117205058042214602911)
% (2.700000000000000000000000000,0.5783554965991442740802876900)
% (2.720000000000000000000000000,0.5846284808465924416813272699)
% (2.740000000000000000000000000,0.5908167194982262720959959025)
% (2.760000000000000000000000000,0.5969208020366532749488519901)
% (2.780000000000000000000000000,0.6029413494705972191016122489)
% (2.800000000000000000000000000,0.6088790115907074308408645888)
% (2.820000000000000000000000000,0.6147344643926488697994771583)
% (2.840000000000000000000000000,0.6205084076582734789474214744)
% (2.860000000000000000000000000,0.6262015626861078540429399870)
% (2.880000000000000000000000000,0.6318146701628156731049755876)
% (2.900000000000000000000000000,0.6373484881677044668307021565)
% (2.920000000000000000000000000,0.6428037903027443557826033937)
% (2.940000000000000000000000000,0.6481813639409507139323591218)
% (2.960000000000000000000000000,0.6534820085863529187302520901)
% (2.980000000000000000000000000,0.6587065343391271590629544240)
% (3.000000000000000000000000000,0.6638557604598125793076126510)

% \rput(3.2,1){$E_0$}
% \rput(1.5,.4){$E_1$}
% \rput(3.2, .7){$E_2$}
% \rput(3.2, .53){$E_3$}
% \rput(1.3,-1.55){$E_0=[0,0,0,0,1],\ E_1=[0,0,1,-1,0],\ E_2=[0,1,1,-2,0],\ E_3=[0,0,1,-7,6]$}

% \pscircle[linecolor=red](1,0){0.1}
% \end{pspicture}
\caption{\label{fig:visLreal}Graph of $L(E,s)$ for $s$ real, for curves of ranks $0$ to $3$.}
\end{center}
\end{figure}

\comment{\begin{figure}
\begin{center}
\includegraphics[width=\textwidth]{graphics/graphX0_11_abs}
\caption{\label{fig:visLabs}Graph of $|L(E,s)|$, for $s$ complex for 
$y^2+ y = x^3 - x^2 - 10x - 20$}
\end{center}
\end{figure}}


\chapter{The Birch and Swinnerton-Dyer Conjecture}

This chapter is about the conjecture of Birch and Swinnerton-Dyer on
the arithmetic of abelian varieties.  We focus primarily on abelian
varieties attached to modular forms.

In the 1960s, Sir Peter Swinnerton-Dyer worked with the EDSAC computer
lab at Cambridge University, and developed an operating system that
ran on that computer (so he told me once).  He and Bryan Birch
programmed EDSAC to compute various quantities associated to elliptic
curves.  They then formulated the conjectures in this chapter in the
case of dimension 1 (see \cite{birch:EDSAC, birch:bsd, sd:bsd}).  Tate
formulated the conjectures in a functorial way for abelian varieties
of arbitrary dimension over global fields in \cite{tate:bsd}, and proved
that if the conjecture is true for an abelian variety~$A$, then it is
also true for each abelian variety isogenous to~$A$.

Suitably interpreted, the conjectures may by viewed as generalizing
the analytic class number formula, and Bloch and Kato generalized the
conjectures to Grothendieck motives in \cite{bloch-kato}.

\section{The Rank conjecture}
Let $A$ be an abelian variety over a number field~$K$. 

\begin{definition}[Mordell-Weil Group]
The {\em Mordell-Weil group} of $A$ is the abelian group $AK)$ of all $K$-rational
points on~$A$.
\end{definition}

\begin{theorem}[Mordell-Weil]
The Mordell-Weil group $A(K)$ of $A$ is finitely generated.
\end{theorem}
The proof is nontrivial and combines two ideas.  First, one proves the
``weak Mordell-Weil theorem'': for any integer~$m$ the quotient $A(K)/mA(K)$ is
finite.  This is proved by combining Galois cohomology techniques with
standard finiteness theorems from algebraic number theory.  The second
idea is to introduce the N\'eron-Tate canonical height
$h:A(K)\to\R_{\geq 0}$ and use properties of~$h$ to deduce, from
finiteness of $A(K)/ m A(K)$, that $A(K)$ itself is finitely generated.

\begin{definition}[Rank]
  By the structure
  theorem $A(K)\isom \Z^r \oplus G_{\tor}$, where~$r$ is a nonnegative
  integer and $G_{\tor}$ is the torsion subgroup of $G$.  The {\em
    rank} of~$A$ is~$r$.
\end{definition}

Let $f \in S_2(\Gamma_1(N))$ be a newform of level~$N$, and let
$A=A_f\subset J_1(N)$ be the corresponding abelian variety.  Let
$f_1,\ldots, f_d$ denote the $\Gal(\Qbar/\Q)$-conjugates of~$f$, so if
$f=\sum a_n q^n$, then $f_i = \sum \sigma(a_n)q^n$, for some
$\sigma\in\Gal(\Qbar/\Q)$.

\begin{definition}[$L$-function of $A$]
We define the $L$-function of $A=A_f$ (or any abelian variety isogenous
to $A$) to be
$$
L(A,s) = \prod_{i=1}^d L(f_i,s).
$$
\end{definition}
By Theorem~\ref{thm:funceqn}, each $L(f_i,s)$ is an entire function
on~$\C$, so $L(A,s)$ is entire.  In Section~\ref{sec;bsdconjnonmod} we
will discuss an intrinsic way to define $L(A,s)$ that does not
require that~$A$ be attached to a modular form.   However, in 
general we do not know that $L(A,s)$ is entire.


\begin{conjecture}[Birch and Swinnerton-Dyer]\label{conj:bsdrank}
  The rank of $A(\Q)$ is equal to $\ord_{s=1}L(A,s)$.
\end{conjecture}

One motivation for Conjecture~\ref{conj:bsdrank} is the following {\em formal}
observation.  Assume for simplicity of notation that $\dim A=1$.  By
Theorem~\ref{thm:eulerprod}, the $L$-function $L(A,s)=L(f,s)$ has an
Euler product representation
$$
L(A,s) = \prod_{p\mid N} \frac{1}{1 - a_p p^{-s}}\cdot
  \prod_{p\nmid N}\frac{1}{1-a_p p^{-s} + p\cdot p^{-2s}},
$$
which is valid for $\Re(s)$ sufficiently large.
(Note that $\eps=1$, since~$A$ is a modular elliptic curve, hence
a quotient of $X_0(N)$.)
There is no loss in considering the product $L^*(A,s)$ over only 
the good primes $p\nmid N$, since $\ord_{s=1}L(A,s) = \ord_{s=1} L^*(A,s)$ 
(because $\prod_{p\mid N} \frac{1}{1 - a_p p^{-s}}$ is nonzero at $s=1$).
We then have {\em formally} that 
\begin{align*}
 L^*(A,1) &= \prod_{p\nmid N} \frac{1}{1-a_p p^{-1} + p^{-1}}\\
          &= \prod_{p\nmid N} \frac{p}{p - a_p + 1}\\
          &= \prod_{p\nmid N} \frac{p}{\# A(\F_p)}
\end{align*}
The intuition is that if the rank of~$A$ is large, i.e., $A(\Q)$ is
large, then each group $A(\F_p)$ will also be large since it has many
points coming from reducing the elements of $A(\Q)$ modulo~$p$.  It
seems likely that if the groups $\# A(\F_p)$ are unusually large, then
$L^*(A,1)=0$, and computational evidence suggests the more precise
Conjecture~\ref{conj:bsdrank}.

\begin{example}
  Let $A_0$ be the elliptic curve $y^2 + y = x^3 - x^2 $, which has
  rank~$0$ and conductor~$11$, let $A_1$ be the elliptic curve $y^2 +
  y = x^3 - x$, which has rank~$1$ and conductor~$37$, let $A_2$ be
  the elliptic curve $y^2 + y = x^3 + x^2 - 2x$, which has rank~$2$
  and conductor~$389$, and finally let $A_3$ be the elliptic curve
  $y^2 + y = x^3 - 7x + 6$, which has rank~$3$ and conductor~$5077$.
  By an exhaustive search, these are known to be the
  smallest-conductor elliptic curves of each rank.
  Conjecture~\ref{conj:bsdrank} is known to be true for them, the most
  difficult being $A_3$, which relies on the results of
  \cite{gross-zagier}.
  
  The following diagram illustrates $|\#A_i(\F_p)|$ for $p<100$, for
  each of these curves.  The height of the red line (first) above the
  prime~$p$ is $|\#A_0(\F_p)|$, the green line (second) gives the
  value for $A_1$, the blue line (third) for $A_2$, and the black line
  (fourth) for $A_3$.  The intuition described above suggests that the
  clumps should look like triangles, with the first line shorter than the
  second, the second shorter than the third, and the third shorter
  than the fourth---however, this is visibly not the case.  The large
  Mordell-Weil group over~$\Q$ does not increase the size of every
  $E(\F_p)$ as much as we might at first suspect.  Nonetheless, the
  first line is no longer than the last line for every~$p$ except
  $p=41,79,83,97$.

  [[THERE IS A COMMENTED OUT POSTSCRIPT PICTURE -- look at source and
  redo it in Sage]]

%   \newcommand{\vbar}[3]{\psline[linecolor=#1](#2,0)(#2,#3)}
%   \psset{unit=0.2in}
% \begin{center}
% \pspicture(1,0)(26,17)
% %\psgrid[gridcolor=lightgray, subgriddiv=10, 
% %         subgridcolor=lightgray, gridlabels=10pt]
% \put(1,-1){$2$}
% \put(2,-1){$3$}
% \put(3,-1){$5$}
% \put(4,-1){$7$}
% \put(5,-1){$11$}
% \put(6,-1){$13$}
% \put(7,-1){$17$}
% \put(8,-1){$19$}
% \put(9,-1){$23$}
% \put(10,-1){$29$}
% \put(11,-1){$31$}
% \put(12,-1){$37$}
% \put(13,-1){$41$}
% \put(14,-1){$43$}
% \put(15,-1){$47$}
% \put(16,-1){$53$}
% \put(17,-1){$59$}
% \put(18,-1){$61$}
% \put(19,-1){$67$}
% \put(20,-1){$71$}
% \put(21,-1){$73$}
% \put(22,-1){$79$}
% \put(23,-1){$83$}
% \put(24,-1){$89$}
% \put(25,-1){$97$}

% \vbar{red}{1.125}{0.83}\vbar{green}{1.250}{0.83}\vbar{blue}{1.375}{0.83}\vbar{black}{1.500}{0.83}
% \vbar{red}{2.125}{0.83}\vbar{green}{2.250}{1.16}\vbar{blue}{2.375}{1.00}\vbar{black}{2.500}{1.16}
% \vbar{red}{3.125}{0.83}\vbar{green}{3.250}{1.33}\vbar{blue}{3.375}{1.50}\vbar{black}{3.500}{1.66}
% \vbar{red}{4.125}{1.66}\vbar{green}{4.250}{1.50}\vbar{blue}{4.375}{2.16}\vbar{black}{4.500}{2.00}
% \vbar{green}{5.250}{2.83}\vbar{blue}{5.375}{2.66}\vbar{black}{5.500}{3.00}
% \vbar{red}{6.125}{1.66}\vbar{green}{6.250}{2.66}\vbar{blue}{6.375}{2.83}\vbar{black}{6.500}{3.00}
% \vbar{red}{7.125}{3.33}\vbar{green}{7.250}{3.00}\vbar{blue}{7.375}{4.00}\vbar{black}{7.500}{3.66}
% \vbar{red}{8.125}{3.33}\vbar{green}{8.250}{3.33}\vbar{blue}{8.375}{2.50}\vbar{black}{8.500}{4.50}
% \vbar{red}{9.125}{4.16}\vbar{green}{9.250}{3.66}\vbar{blue}{9.375}{4.66}\vbar{black}{9.500}{5.00}
% \vbar{red}{10.125}{5.00}\vbar{green}{10.250}{4.00}\vbar{blue}{10.375}{6.00}\vbar{black}{10.500}{6.00}
% \vbar{red}{11.125}{4.16}\vbar{green}{11.250}{6.00}\vbar{blue}{11.375}{4.66}\vbar{black}{11.500}{5.66}
% \vbar{red}{12.125}{5.83}\vbar{blue}{12.375}{7.66}\vbar{black}{12.500}{6.33}
% \vbar{red}{13.125}{8.33}\vbar{green}{13.250}{8.50}\vbar{blue}{13.375}{7.50}\vbar{black}{13.500}{7.00}
% \vbar{red}{14.125}{8.33}\vbar{green}{14.250}{7.00}\vbar{blue}{14.375}{5.33}\vbar{black}{14.500}{8.66}
% \vbar{red}{15.125}{6.66}\vbar{green}{15.250}{9.50}\vbar{blue}{15.375}{8.33}\vbar{black}{15.500}{9.50}
% \vbar{red}{16.125}{10.00}\vbar{green}{16.250}{8.83}\vbar{blue}{16.375}{10.00}\vbar{black}{16.500}{10.50}
% \vbar{red}{17.125}{9.16}\vbar{green}{17.250}{8.66}\vbar{blue}{17.375}{9.50}\vbar{black}{17.500}{11.83}
% \vbar{red}{18.125}{8.33}\vbar{green}{18.250}{11.66}\vbar{blue}{18.375}{11.66}\vbar{black}{18.500}{10.66}
% \vbar{red}{19.125}{12.50}\vbar{green}{19.250}{10.00}\vbar{blue}{19.375}{12.16}\vbar{black}{19.500}{13.33}
% \vbar{red}{20.125}{12.50}\vbar{green}{20.250}{10.50}\vbar{blue}{20.375}{13.66}\vbar{black}{20.500}{13.33}
% \vbar{red}{21.125}{11.66}\vbar{green}{21.250}{12.50}\vbar{blue}{21.375}{13.50}\vbar{black}{21.500}{14.66}
% \vbar{red}{22.125}{15.00}\vbar{green}{22.250}{12.66}\vbar{blue}{22.375}{15.50}\vbar{black}{22.500}{11.83}
% \vbar{red}{23.125}{15.00}\vbar{green}{23.250}{16.50}\vbar{blue}{23.375}{16.00}\vbar{black}{23.500}{14.33}
% \vbar{red}{24.125}{12.50}\vbar{green}{24.250}{14.33}\vbar{blue}{24.375}{16.33}\vbar{black}{24.500}{13.16}
% \vbar{red}{25.125}{17.50}\vbar{green}{25.250}{15.66}\vbar{blue}{25.375}{17.83}\vbar{black}{25.500}{15.33}


% \endpspicture{}

%\vspace{3ex}
%\end{center}
% \comment{
% E := [EC("11A3"), EC("37A1"), EC("389A1"), EC("5077A1")];
% P := PrimeSeq(2,500);
% COLOR := ["red", "green", "blue", "black"];
% for j in [1..#P] do 
%    p := P[j];
%    for i in [1..4] do 
%       Ei := E[i];
%       if Conductor(Ei) mod p ne 0 then
%          Ep := ChangeRing(Ei,GF(p));
% %         printf "\\vbar{%o}{%o}{%o}",COLOR[i], j, #Ep - (p+1);
%       end if;
%    end for;
%    print "";
% end for;
% }
\end{example}

\begin{remark}
  Suppose that $L(A,1)\neq 0$.  Then assuming the Riemann hypothesis
  for $L(A,s)$ (i.e., that $L(A,s)\neq 0$ for $\Re(s)>1$), Goldfeld
  \cite{goldfeld:L1} proved that the Euler product for $L(A,s)$,
  formally evaluated at~$1$, converges but {\em does not} converge to
  $L(A,1)$.  Instead, it converges (very slowly) to $L(A,1)/\sqrt{2}$.
  For further details and insight into this strange behavior, see
  \cite{conrad:eulerprod}.
\end{remark}


\begin{remark}
  The Clay Math Institute has offered a one million dollar prize for a
  proof of Conjecture~\ref{conj:bsdrank} for elliptic curves
  over~$\Q$.  See \cite{wiles:cmi}.
\end{remark}

\begin{theorem}[Kolyvagin-Logachev]\label{thm:kolylog}
Suppose $f\in S_2(\Gamma_0(N))$ is a newform such that $\ord_{s=1} L(f,s) \leq 1$. Then
Conjecture~\ref{conj:bsdrank} is true for $A_f$.
\end{theorem}

\begin{theorem}[Kato]\label{thm:kato}
  Suppose $f\in S_2(\Gamma_1(N))$ and $L(f,1)\neq 0$.  Then
  Conjecture~\ref{conj:bsdrank} is true for $A_f$.
\end{theorem}

\section{Refined rank zero conjecture}
Let $f \in S_2(\Gamma_1(N))$ be a newform of level~$N$, and let
$A_f\subset J_1(N)$ be the corresponding abelian variety.

The following conjecture refines Conjecture~\ref{conj:bsdrank} in the
case $L(A,1)\neq 0$.  We recall some of the notation below, where we
give a formula for $L(A,1)/\Omega_A$, which can be computed up to an
vinteger, which we call the Manin index.  Note that the definitions,
results, and proofs in this section are all true exactly as stated
with $X_1(N)$ replaced by $X_0(N)$, which is relevant if one wants
to do computations. 

\begin{conjecture}[Birch and Swinnerton-Dyer]\label{conj:bsd0}
Suppose $L(A,1)\neq 0$.  Then
$$
  \frac{L(A,1)}{\Omega_A}  = 
  \frac{\#\Sha(A)\cdot \prod_{p\mid N} c_p}{\#A(\Q)_{\tor}\cdot \#A^{\vee}(\Q)_{\tor}}.
$$
\end{conjecture}
By Theorem~\ref{thm:kato}, the group $\Sha(A)$ is finite, so the right
hand side makes sense.   The right hand side is a rational number, so if
Conjecture~\ref{conj:bsd0} is true, then the quotient $L(A,1)/\Omega_A$
should also be a rational number.  In fact, this is true, as we will prove
below (see Theorem~\ref{thm:lratio}).   Below we will discuss aspects of
the proof of rationality in the case that~$A$ is an elliptic curve, and
at the end of this section we give a proof of the general case.

In to more easily understanding $L(A,1)/\Omega_A$, it will be easiest
to work with $A=A_f^{\vee}$, where $A_f^{\vee}$ is the dual of $A_f$.
We view $A$ naturally as a quotient of $J_1(N)$ as follows.  Dualizing
the map $A_f\hra J_1(N)$ we obtain a surjective map $J_1(N)\to
A_f^{\vee}$.  Passing to the dual doesn't affect whether or not
$L(A,1)/\Omega_A$ is rational, since changing $A$ by an isogeny does
not change $L(A,1)$, and only changes $\Omega_A$ by multiplication by
a nonzero rational number.


\subsection{The Number of real components}
\begin{definition}[Real Components]
Let $c_\infty$ be the number of connected components of $A(\R)$. 
\end{definition}
If~$A$ is an elliptic curve, then $c_\infty=1$ or $2$, depending on
whether the graph of the affine part of $A(\R)$ in the plane $\R^2$ is
connected.  For example, Figure~\ref{fig:graphreal} shows the real
points of the elliptic curve defined by $y^2=x^3-x$ in the three
affine patches that cover $\P^2$.  The completed curve has two real
components.

In general, there is a simple formula for $c_\infty$ in
terms of the action of complex conjugation on $\H_1(A(\R),\Z)$, which
can be computed using modular symbols.  The formula is
$$
  \log_2(c_\infty) = \dim_{\F_2} A(\R)[2] - \dim(A).
$$

\begin{figure}\label{fig:graphreal}
\begin{center}
  [[THERE IS A COMMENTED OUT POSTSCRIPT PICTURE -- look at source and
  redo it in Sage]]

% \psset{unit=.25in}
% \pspicture(-2.0000,-5)(3.0000,5)
% \psgrid[gridcolor=lightgray, subgriddiv=1]

% \psline[linewidth=0.03]{->}(-1.0000,0)(3.0000,0)    \rput(3.4,0){$x$}
% \psline[linewidth=0.03]{->}(0,-4.8989)(0,4.8989)    \rput(0,5.4){$y$}

% \pscurve[linecolor=blue]
% (3.0000,4.8989)
% (2.8750,4.5704)
% (2.7500,4.2481)
% (2.6250,3.9322)
% (2.5000,3.6228)
% (2.3750,3.3198)
% (2.2500,3.0233)
% (2.1250,2.7332)
% (2.0000,2.4494)
% (1.8750,2.1718)
% (1.7500,1.8998)
% (1.6250,1.6327)
% (1.5000,1.3693)
% (1.3750,1.1066)
% (1.2500,0.83852)
% (1.1250,0.54665)
% (1.0000,0)
% (1.1250,-0.54665)
% (1.2500,-0.83852)
% (1.3750,-1.1066)
% (1.5000,-1.3693)
% (1.6250,-1.6328)
% (1.7500,-1.8998)
% (1.8750,-2.1718)
% (2.0000,-2.4494)
% (2.1250,-2.7332)
% (2.2500,-3.0233)
% (2.3750,-3.3198)
% (2.5000,-3.6228)
% (2.6250,-3.9323)
% (2.7500,-4.2481)
% (2.8750,-4.5704)
% (3.0000,-4.8989)


% \pscurve[linecolor=blue]
% (0,0)
% (-0.12500,0.35078)
% (-0.25000,0.48412)
% (-0.37500,0.56768)
% (-0.50000,0.61237)
% (-0.62500,0.61713)
% (-0.75000,0.57282)
% (-0.87500,0.45285)
% (-1.0000,0)
% (-0.87500,-0.45285)
% (-0.75000,-0.57282)
% (-0.62500,-0.61714)
% (-0.50000,-0.61237)
% (-0.37500,-0.56768)
% (-0.25000,-0.48412)
% (-0.12500,-0.35078)
% (0,0)
% \endpspicture
% \qquad\qquad
% \psset{unit=.25in}
% \pspicture(-2.0000,-5)(2.0000,5)
% \psgrid[gridcolor=lightgray, subgriddiv=1]

% \psline[linewidth=0.03]{->}(-2.0000,0)(2.0000,0)    \rput(2.5,0){$x$}
% \psline[linewidth=0.03]{->}(0,-5.500)(0,5.1)    \rput(0,5.4){$z$}

% \pscurve[linecolor=blue]
% (2.0000,1.7655)
% (1.9733,1.7361)
% (1.9466,1.7066)
% (1.9200,1.6771)
% (1.8933,1.6475)
% (1.8666,1.6179)
% (1.8400,1.5882)
% (1.8133,1.5584)
% (1.7866,1.5286)
% (1.7600,1.4986)
% (1.7333,1.4687)
% (1.7066,1.4386)
% (1.6800,1.4085)
% (1.6533,1.3783)
% (1.6266,1.3480)
% (1.6000,1.3177)
% (1.5733,1.2873)
% (1.5466,1.2568)
% (1.5200,1.2262)
% (1.4933,1.1955)
% (1.4666,1.1648)
% (1.4400,1.1340)
% (1.4133,1.1031)
% (1.3866,1.0722)
% (1.3600,1.0411)
% (1.3333,1.0100)
% (1.3066,0.97889)
% (1.2800,0.94765)
% (1.2533,0.91635)
% (1.2266,0.88500)
% (1.2000,0.85361)
% (1.1733,0.82218)
% (1.1466,0.79073)
% (1.1200,0.75926)
% (1.0933,0.72780)
% (1.0666,0.69637)
% (1.0400,0.66498)
% (1.0133,0.63365)
% (0.98666,0.60243)
% (0.96000,0.57135)
% (0.93333,0.54043)
% (0.90666,0.50973)
% (0.88000,0.47930)
% (0.85333,0.44919)
% (0.82666,0.41947)
% (0.80000,0.39019)
% (0.77333,0.36145)
% (0.74666,0.33331)
% (0.72000,0.30588)
% (0.69333,0.27923)
% (0.66666,0.25346)
% (0.64000,0.22867)
% (0.61333,0.20495)
% (0.58666,0.18239)
% (0.56000,0.16108)
% (0.53333,0.14108)
% (0.50666,0.12246)
% (0.48000,0.10527)
% (0.45333,0.089531)
% (0.42666,0.075256)
% (0.40000,0.062440)
% (0.37333,0.051061)
% (0.34666,0.041076)
% (0.32000,0.032431)
% (0.29333,0.025055)
% (0.26666,0.018868)
% (0.24000,0.013778)
% (0.21333,0.0096890)
% (0.18666,0.0064964)
% (0.16000,0.0040933)
% (0.13333,0.0023696)
% (0.10666,0.0012134)
% (0.080000,0.00051198)
% (0.053333,0.00015170)
% (0.026666,0.000018962)
% (0,0)
% (-0.026666,-0.000018963)
% (-0.053333,-0.00015170)
% (-0.080000,-0.00051198)
% (-0.10666,-0.0012134)
% (-0.13333,-0.0023696)
% (-0.16000,-0.0040933)
% (-0.18666,-0.0064964)
% (-0.21333,-0.0096890)
% (-0.24000,-0.013778)
% (-0.26666,-0.018868)
% (-0.29333,-0.025055)
% (-0.32000,-0.032431)
% (-0.34666,-0.041076)
% (-0.37333,-0.051061)
% (-0.40000,-0.062440)
% (-0.42666,-0.075256)
% (-0.45333,-0.089531)
% (-0.48000,-0.10527)
% (-0.50666,-0.12246)
% (-0.53333,-0.14108)
% (-0.56000,-0.16108)
% (-0.58666,-0.18240)
% (-0.61333,-0.20495)
% (-0.64000,-0.22867)
% (-0.66666,-0.25346)
% (-0.69333,-0.27923)
% (-0.72000,-0.30588)
% (-0.74666,-0.33332)
% (-0.77333,-0.36145)
% (-0.80000,-0.39019)
% (-0.82666,-0.41947)
% (-0.85333,-0.44919)
% (-0.88000,-0.47930)
% (-0.90667,-0.50974)
% (-0.93333,-0.54043)
% (-0.96000,-0.57135)
% (-0.98667,-0.60244)
% (-1.0133,-0.63366)
% (-1.0400,-0.66498)
% (-1.0666,-0.69637)
% (-1.0933,-0.72780)
% (-1.1200,-0.75926)
% (-1.1466,-0.79073)
% (-1.1733,-0.82218)
% (-1.2000,-0.85361)
% (-1.2266,-0.88501)
% (-1.2533,-0.91635)
% (-1.2800,-0.94765)
% (-1.3066,-0.97889)
% (-1.3333,-1.0100)
% (-1.3600,-1.0411)
% (-1.3866,-1.0722)
% (-1.4133,-1.1031)
% (-1.4400,-1.1340)
% (-1.4666,-1.1648)
% (-1.4933,-1.1955)
% (-1.5200,-1.2262)
% (-1.5466,-1.2568)
% (-1.5733,-1.2873)
% (-1.6000,-1.3177)
% (-1.6266,-1.3480)
% (-1.6533,-1.3783)
% (-1.6800,-1.4085)
% (-1.7066,-1.4386)
% (-1.7333,-1.4687)
% (-1.7600,-1.4986)
% (-1.7866,-1.5286)
% (-1.8133,-1.5584)
% (-1.8400,-1.5882)
% (-1.8666,-1.6179)
% (-1.8933,-1.6475)
% (-1.9200,-1.6771)
% (-1.9466,-1.7066)
% (-1.9733,-1.7361)
% (-2.0000,-1.7655)


% \pscurve[linecolor=blue]
% (2.0000,-2.2655)
% (1.9733,-2.2429)
% (1.9466,-2.2203)
% (1.9200,-2.1980)
% (1.8933,-2.1757)
% (1.8666,-2.1536)
% (1.8400,-2.1317)
% (1.8133,-2.1099)
% (1.7866,-2.0883)
% (1.7600,-2.0668)
% (1.7333,-2.0456)
% (1.7066,-2.0246)
% (1.6800,-2.0037)
% (1.6533,-1.9831)
% (1.6266,-1.9628)
% (1.6000,-1.9427)
% (1.5733,-1.9229)
% (1.5466,-1.9033)
% (1.5200,-1.8841)
% (1.4933,-1.8652)
% (1.4666,-1.8466)
% (1.4400,-1.8285)
% (1.4133,-1.8107)
% (1.3866,-1.7933)
% (1.3600,-1.7764)
% (1.3333,-1.7600)
% (1.3066,-1.7442)
% (1.2800,-1.7289)
% (1.2533,-1.7142)
% (1.2266,-1.7002)
% (1.2000,-1.6869)
% (1.1733,-1.6744)
% (1.1466,-1.6628)
% (1.1200,-1.6521)
% (1.0933,-1.6424)
% (1.0666,-1.6338)
% (1.0400,-1.6265)
% (1.0133,-1.6205)
% (0.98666,-1.6159)
% (0.96000,-1.6130)
% (0.93333,-1.6118)
% (0.90666,-1.6126)
% (0.88000,-1.6156)
% (0.85333,-1.6210)
% (0.82666,-1.6291)
% (0.80000,-1.6402)
% (0.77333,-1.6545)
% (0.74666,-1.6726)
% (0.72000,-1.6947)
% (0.69333,-1.7215)
% (0.66666,-1.7534)
% (0.64000,-1.7911)
% (0.61333,-1.8353)
% (0.58666,-1.8869)
% (0.56000,-1.9468)
% (0.53333,-2.0160)
% (0.50666,-2.0961)
% (0.48000,-2.1886)
% (0.45333,-2.2954)
% (0.42666,-2.4190)
% (0.40000,-2.5624)
% (0.37333,-2.7296)
% (0.34666,-2.9257)
% (0.32000,-3.1574)
% (0.29333,-3.4341)
% (0.26666,-3.7688)
% (0.24000,-4.1804)
% (0.21333,-4.6972)
% (0.18666,-5.3636)
% %(0.16000,-6.2541)


% \pscurve[linecolor=blue]
% %(-0.16000,6.2541)
% (-0.18666,5.3636)
% (-0.21333,4.6971)
% (-0.24000,4.1804)
% (-0.26666,3.7688)
% (-0.29333,3.4341)
% (-0.32000,3.1574)
% (-0.34666,2.9256)
% (-0.37333,2.7296)
% (-0.40000,2.5624)
% (-0.42666,2.4190)
% (-0.45333,2.2954)
% (-0.48000,2.1886)
% (-0.50666,2.0961)
% (-0.53333,2.0160)
% (-0.56000,1.9468)
% (-0.58666,1.8869)
% (-0.61333,1.8353)
% (-0.64000,1.7911)
% (-0.66666,1.7534)
% (-0.69333,1.7215)
% (-0.72000,1.6947)
% (-0.74666,1.6726)
% (-0.77333,1.6545)
% (-0.80000,1.6402)
% (-0.82666,1.6291)
% (-0.85333,1.6210)
% (-0.88000,1.6156)
% (-0.90667,1.6126)
% (-0.93333,1.6118)
% (-0.96000,1.6130)
% (-0.98667,1.6159)
% (-1.0133,1.6205)
% (-1.0400,1.6265)
% (-1.0666,1.6338)
% (-1.0933,1.6424)
% (-1.1200,1.6521)
% (-1.1466,1.6628)
% (-1.1733,1.6744)
% (-1.2000,1.6869)
% (-1.2266,1.7002)
% (-1.2533,1.7142)
% (-1.2800,1.7289)
% (-1.3066,1.7442)
% (-1.3333,1.7600)
% (-1.3600,1.7764)
% (-1.3866,1.7933)
% (-1.4133,1.8107)
% (-1.4400,1.8284)
% (-1.4666,1.8466)
% (-1.4933,1.8652)
% (-1.5200,1.8841)
% (-1.5466,1.9033)
% (-1.5733,1.9229)
% (-1.6000,1.9427)
% (-1.6266,1.9628)
% (-1.6533,1.9831)
% (-1.6800,2.0037)
% (-1.7066,2.0246)
% (-1.7333,2.0456)
% (-1.7600,2.0668)
% (-1.7866,2.0883)
% (-1.8133,2.1099)
% (-1.8400,2.1317)
% (-1.8666,2.1536)
% (-1.8933,2.1757)
% (-1.9200,2.1980)
% (-1.9466,2.2203)
% (-1.9733,2.2429)
% (-2.0000,2.2655)
% \endpspicture
% \qquad\qquad
% \psset{unit=.25in}
% \pspicture(-3.0000,-5.0)(1.0,5.0)
% \psgrid[gridcolor=lightgray, subgriddiv=1]

% \psline[linewidth=0.03]{->}(-3.0000,0)(1.0000,0)    \rput(1.5,0){$z$}
% \psline[linewidth=0.03]{->}(0,-4.9960)(0,5.0)    \rput(0,5.3){$y$}

% \pscurve[linecolor=blue]
% (-3.0000,-1.6329)
% (-2.9600,-1.6193)
% (-2.9200,-1.6054)
% (-2.8800,-1.5914)
% (-2.8400,-1.5773)
% (-2.8000,-1.5629)
% (-2.7600,-1.5484)
% (-2.7200,-1.5337)
% (-2.6800,-1.5188)
% (-2.6400,-1.5037)
% (-2.6000,-1.4884)
% (-2.5600,-1.4728)
% (-2.5200,-1.4571)
% (-2.4800,-1.4411)
% (-2.4400,-1.4248)
% (-2.4000,-1.4083)
% (-2.3600,-1.3915)
% (-2.3200,-1.3744)
% (-2.2800,-1.3569)
% (-2.2400,-1.3392)
% (-2.2000,-1.3211)
% (-2.1600,-1.3027)
% (-2.1200,-1.2838)
% (-2.0800,-1.2646)
% (-2.0400,-1.2449)
% (-2.0000,-1.2247)
% (-1.9600,-1.2040)
% (-1.9200,-1.1828)
% (-1.8800,-1.1610)
% (-1.8400,-1.1386)
% (-1.8000,-1.1155)
% (-1.7600,-1.0917)
% (-1.7200,-1.0670)
% (-1.6800,-1.0415)
% (-1.6400,-1.0150)
% (-1.6000,-0.98742)
% (-1.5600,-0.95863)
% (-1.5200,-0.92849)
% (-1.4800,-0.89684)
% (-1.4400,-0.86345)
% (-1.4000,-0.82808)
% (-1.3600,-0.79038)
% (-1.3200,-0.74995)
% (-1.2800,-0.70622)
% (-1.2400,-0.65844)
% (-1.2000,-0.60553)
% (-1.1600,-0.54583)
% (-1.1200,-0.47659)
% (-1.0800,-0.39252)
% (-1.0400,-0.28011)
% (-1.0000,0)
% (-1.0000,0)
% (-1.0400,0.28011)
% (-1.0800,0.39252)
% (-1.1200,0.47659)
% (-1.1600,0.54583)
% (-1.2000,0.60553)
% (-1.2400,0.65844)
% (-1.2800,0.70622)
% (-1.3200,0.74995)
% (-1.3600,0.79038)
% (-1.4000,0.82808)
% (-1.4400,0.86345)
% (-1.4800,0.89684)
% (-1.5200,0.92849)
% (-1.5600,0.95863)
% (-1.6000,0.98742)
% (-1.6400,1.0150)
% (-1.6800,1.0415)
% (-1.7200,1.0670)
% (-1.7600,1.0917)
% (-1.8000,1.1155)
% (-1.8400,1.1386)
% (-1.8800,1.1610)
% (-1.9200,1.1828)
% (-1.9600,1.2040)
% (-2.0000,1.2247)
% (-2.0400,1.2449)
% (-2.0800,1.2646)
% (-2.1200,1.2838)
% (-2.1600,1.3027)
% (-2.2000,1.3211)
% (-2.2400,1.3392)
% (-2.2800,1.3569)
% (-2.3200,1.3743)
% (-2.3600,1.3915)
% (-2.4000,1.4083)
% (-2.4400,1.4248)
% (-2.4800,1.4411)
% (-2.5200,1.4571)
% (-2.5600,1.4728)
% (-2.6000,1.4884)
% (-2.6400,1.5037)
% (-2.6800,1.5188)
% (-2.7200,1.5337)
% (-2.7600,1.5484)
% (-2.8000,1.5629)
% (-2.8400,1.5773)
% (-2.8800,1.5914)
% (-2.9200,1.6054)
% (-2.9600,1.6193)
% (-3.0000,1.6329)


% \pscurve[linecolor=blue]
% (0.040000,-4.9960)
% (0.080000,-3.5242)
% (0.12000,-2.8659)
% (0.16000,-2.4678)
% (0.20000,-2.1908)
% (0.24000,-1.9815)
% (0.28000,-1.8142)
% (0.32000,-1.6748)
% (0.36000,-1.5549)
% (0.40000,-1.4491)
% (0.44000,-1.3537)
% (0.48000,-1.2662)
% (0.52000,-1.1845)
% (0.56000,-1.1071)
% (0.60000,-1.0327)
% (0.64000,-0.96047)
% (0.68000,-0.88915)
% (0.72000,-0.81785)
% (0.76000,-0.74551)
% (0.80000,-0.67082)
% (0.84000,-0.59201)
% (0.88000,-0.50632)
% (0.92000,-0.40860)
% (0.96000,-0.28577)
% (1.0000,0)
% (1.0000,0)
% (0.96000,0.28577)
% (0.92000,0.40860)
% (0.88000,0.50632)
% (0.84000,0.59201)
% (0.80000,0.67082)
% (0.76000,0.74551)
% (0.72000,0.81785)
% (0.68000,0.88915)
% (0.64000,0.96047)
% (0.60000,1.0327)
% (0.56000,1.1071)
% (0.52000,1.1845)
% (0.48000,1.2662)
% (0.44000,1.3537)
% (0.40000,1.4491)
% (0.36000,1.5549)
% (0.32000,1.6748)
% (0.28000,1.8142)
% (0.24000,1.9815)
% (0.20000,2.1908)
% (0.16000,2.4677)
% (0.12000,2.8658)
% (0.080000,3.5242)
% (0.040000,4.9960)
% \endpspicture

\end{center}
\caption{Graphs of real solutions to $y^2z = x^3 - xz^2$ on three affine patches}
\end{figure}


\subsection{The Manin index}
The map $J_1(N)\to A$ induces a map $\cJ\to\cA$ on N\'eron models.
Pullback of differentials defines a map 
\begin{equation}\label{eqn:neron_pullback}
  \H^0(\cA,\Omega_{\cA/\Z}^1) \to \H^0(\cJ,\Omega_{\cJ/\Z}^1).
\end{equation}
One can show\edit{reference or further discussion} that there is a
$q$-expansion map
\begin{equation}\label{eqn:neron_qexp}
\H^0(\cJ,\Omega_{\cJ/\Z}^1)\to \Z[[q]]
\end{equation}
which agrees with the usual $q$-expansion map after tensoring
with~$\C$.  (For us $X_1(N)$ is the curve that parameterizes pairs
$(E,\mu_N\hra E)$, so that there is a $q$-expansion map with values in
$\Z[[q]]$.)


Let $\vphi_A$ be the composition of (\ref{eqn:neron_pullback})
with (\ref{eqn:neron_qexp}).
\begin{definition}[Manin Index]
The {\em Manin index} $c_A$ of~$A$ is the index of 
$\vphi_A(\H^0(\cA,\Omega_{\cA/\Z}^1))$
in its saturation.  I.e., it is the order of the quotient group
$$
 \left( \frac{\Z[[q]]}{\vphi_A(\H^0(\cA,\Omega_{\cA/\Z}^1))} \right)_{\tor}.
$$
\end{definition}

\begin{openproblem}
Find an algorithm to compute $c_A$.
\end{openproblem}
Manin conjectured that $c_A=1$ when $\dim A=1$, and I think $c_A=1$ in general.
\begin{conjecture}[Agashe, Stein]
$c_A=1$.
\end{conjecture}
This conjecture is false if~$A$ is not required to be attached to a
newform, even if $A_f\subset J_1(N)^{\new}$.  For example, Adam Joyce,
a student of Kevin Buzzard, found an $A\subset J_1(431)$ (and also
$A'\subset J_0(431)$) whose Manin constant is~$2$.  Here~$A$ is
isogenous over~$\Q$ to a product of two elliptic curves.  \edit{Add
  better reference.}  Also, the Manin index for $J_0(33)$ (viewed as a
quotient of $J_0(33)$) is divisible by~$3$, because there is a cusp
form in $S_2(\Gamma_0(33))$ that has integer Fourier expansion
at~$\infty$, but not at one of the other cusps.

\begin{theorem}
  If $f\in S_2(\Gamma_0(N))$ then the Manin index $c$ of
  $A_f^{\vee}$ can only divisible by~$2$ or primes
  whose square divides $N$.  Moreover, if $4\nmid N$, then
  $\ord_2(c)\leq \dim(A_f)$. 
\end{theorem}
The proof involves applying nontrivial theorems of Raynaud about
exactness of sequences of differentials, then using a trick with the
Atkin-Lehner involution, which was introduced by Mazur in
\cite{mazur:rational}, and finally one applies the ``$q$-expansion
principle'' in characteristic~$p$ to deduce the result (see
\cite{agashe-stein:manin}).  Also, Edixhoven claims he can prove that
if $A_f$ is an elliptic curve then~$c_A$ is only divisible by $2$,
$3$, $5$, or $7$.  His argument use his semistable models for
$X_0(p^2)$, but my understanding is that the details are not all
written up.\edit{Refine.}


\subsection{The Real volume $\Omega_A$}


\begin{definition}[Real Volume]
  The {\em real volume} $\Omega_A$ of $A(\R)$ is the volume of $A(\R)$
  with respect to a measure obtained by wedging together a basis for
  $\H^0(\cA,\Omega^1)$.
\end{definition}

If~$A$ is an elliptic curve with {\em minimal} Weierstrass equation
$$y^2 + a_1 xy + a_3 y = x^3 + a_2 x^2 + a_4 x + a_6,$$
then one can show that
\begin{equation}\label{eqn:mindif}
\omega = \frac{dx}{2y+a_1x + a_3}
\end{equation}
is a basis for $\H^0(\cA,\Omega^1)$.  Thus 
$$
\Omega_A = \int_{A(\R)} \frac{dx}{2y+a_1x + a_3}.
$$
There is a fast algorithm for computing $\Omega_A$, for~$A$ an
elliptic curve, which relies on the quickly-convergent Gauss
arithmetic-geometric mean (see \cite[\S3.7]{cremona:algs}).
For example, if~$A$ is the curve defined by $y^2=x^3-x$ (this
is a minimal model), then 
$$
  \Omega_A \sim 2 \times 2.622057554292119810464839589.
  $$
  For a general abelian variety~$A$, it is an open problem to
  compute $\Omega_A$.  However, we can compute $\Omega_A/c_A$, where
  $c_A$ is the Manin index of~$A$, by explicitly computing~$A$ as a
  complex torus using the period mapping $\Phi$, which we
  define in the next section.

\subsection{The Period mapping}
Let 
$$
\Phi:\H_1(X_1(N),\Z) \to \Hom_\C(\C f_1 + \cdots + \C f_d,\C)
$$
be the {\em period mapping} on integral homology induced by
integrating homology classes on $X_0(N)$ against the $\C$-vector space
spanned by the $\Gal(\Qbar/\Q)$-conjugates $f_i$ of~$f$.  
Extend $\Phi$ to $\H_1(X_1(N),\Q)$ by $\Q$-linearity.
We normalize
$\Phi$ so that $\Phi(\{0,\infty\})(f) = L(f,1)$.  More explicitly, for
$\alpha,\beta\in\P^1(\Q)$, we have
$$
  \Phi(\{\alpha,\beta\})(f) = -2\pi i \int_{\alpha}^{\beta} f(z) dz.
$$
The motivation for this normalization is that 
\begin{equation}\label{eqn:l_of_one}
  L(f,1) = -2\pi i \int_{0}^{i\infty}  f(z) dz,
\end{equation}
which we see immediately from the Mellin transform definition of $L(f,s)$:
$$
  L(f,s) = (2\pi)^s\Gamma(s)^{-1}\int_{0}^{i\infty} (-iz)^s f(z) \frac{dz}{z}.
$$


\subsection{The Manin-Drinfeld theorem}
Recall the Manin-Drinfeld theorem, which we proved long ago, asserts
that $\{0,\infty\} \in \H_1(X_0(N),\Q)$.  We proved this by explicitly
computing $(p+1-T_p)(\{0,\infty\})$, for $p\nmid N$, noting that the
result is in $\H_1(X_0(N),\Z)$, and inverting $p+1-T_p$.  Thus there
is an integer~$n$ such that $n\{0,\infty\} \in \H_1(X_0(N),\Z)$.

Suppose that $A=A_f^{\vee}$ is an elliptic curve quotient of $J_0(N)$.
Rewriting (\ref{eqn:l_of_one}) in terms of $\Phi$, we have
$\Phi(\{0,\infty\}) = L(f,1)$.  Let $\omega$ be a minimal differential
on~$A$, as in (\ref{eqn:mindif}), so $\omega = -c_A \cdot 2\pi i
f(z)dz$, where $c_A$ is the Manin index of~$A$, and the equality is
after pulling $\omega$ back to $\H^0(X_0(N),\Omega) \isom
S_2(\Gamma_0(N))$.  Note that when we defined $c_A$, there was no
factor of $2\pi i$, since we compared $\omega$ with $f(q)
\frac{dq}{q}$, and $q=e^{2\pi i z}$, so $dq/q = 2\pi i dz.$

\subsection{The Period lattice}
The {\em period lattice} of~$A$ with respect to a nonzero differential~$g$ on~$A$ is 
$$
\cL_g = \left\{\int_{\gamma} g : \gamma\in\H_1(A,\Z)\right\},
$$
and we have $A(\C)\isom \C/\cL_g$.  This is the Abel-Jacobi
theorem, and the significance of~$g$ is that we are choosing a basis
for the one-dimensional $\C$-vector space $\Hom(\H^0(A,\Omega),\C)$,
in order to embed the image of $\H_1(A,\Z)$ in~$\C$.

The integral $\int_{A(\R)} g$ is ``visible'' in terms of the complex
torus representation of $A(\C)=\C/\cL_g$.  More precisely, if $\cL_g$
is not rectangular, then $A(\R)$ may be identified with the part of
the real line in a fundamental domain for $\cL_g$, and $\int_{A(\R)}
g$ is the length of this segment of the real line.  If $\cL_g$ is
rectangular, then it is that line along with another line above it
that is midway to the top of the fundamental domain.

The real volume, which appears in
Conjecture~\ref{conj:bsd0}, is 
$$
\Omega_A = \int_{A(\R)} \omega = -c_A \cdot 2\pi i \int_{A(\R)} f.
$$
Thus $\Omega_A$ is the least positive real number in
$\cL_\omega=-c_A \cdot 2\pi i\cL_f$, when the period lattice is not
rectangular, and twice the least positive real number when it is.

\subsection{The Special value $L(A,1)$}
\begin{proposition}\label{prop:realL}
We have $L(f,1)\in\R$.
\end{proposition}

\begin{proof}
With the right setup, this would follow immediately from the
fact that  $z\mapsto -\overline{z}$ fixes the 
homology class $\{0,\infty\}$.   However, we don't have such
a setup, so we give a direct proof.

  Just as in the proof of the functional equation for $\Lambda(f,s)$,
  use that~$f$ is an eigenvector for the Atkin-Lehner operator $W_N$
  and (\ref{eqn:l_of_one}) to write $L(f,1)$ as the sum of two
  integrals from $i/\sqrt{N}$ to $i\infty$.  Then use the 
  calculation
\begin{align*}
 \overline{ 2\pi i \int_{i/\sqrt{N}}^{i\infty} \sum_{n=1}^{\infty} a_n e^{2\pi i n z} dz }
 & = -2\pi i \sum_{n=1}^{\infty} a_n \overline{\int_{i/\sqrt{N}}^{i\infty} e^{2\pi i n z} dz} \\
   &= 
 -2\pi i \sum_{n=1}^{\infty} a_n \overline{\frac{1}{2\pi i n} e^{-2\pi n/\sqrt{N}}} \\
&= 2\pi i \sum_{n=1}^{\infty} a_n \frac{1}{2\pi i n} e^{2\pi n/\sqrt{N}} \\
\end{align*}
to see that $\overline{L(f,1)} = L(f,1)$.
\end{proof}

\begin{remark}
The BSD conjecture implies that $L(f,1)\geq 0$, but this is unknown
(it follows from GRH for $L(f,s)$).
\end{remark}

\subsection{Rationality of $L(A,1)/\Omega_A$}

\begin{proposition}\label{prop:lratio1}
  Suppose $A=A_f$ is an elliptic curve.  Then $L(A,1)/\Omega_A \in\Q$.
  More precisely, if~$n$ is the smallest multiple of $\{0,\infty\}$
  that lies in $\H_1(X_0(N),\Z)$ and $c_A$ is the Manin constant of~$A$, then
  $2 n \cdot c_A \cdot L(A,1)/\Omega_A \in\Z$.
\end{proposition}
\begin{proof}
By the Manin-Drinfeld theorem $n\{0,\infty\}\in\H_1(X_0(N),\Z)$, so
$$
  n \cdot L(f,1) = -n\cdot 2\pi i \cdot \int_{0}^{i\infty} f(z)dz 
  \in -2\pi i\cdot\cL_f
         = \frac{1}{c_A} \cL_\omega.
$$
Combining this with Proposition~\ref{prop:realL}, we see that 
$$
  n \cdot c_A \cdot L(f,1) \in \cL_\omega^+,
  $$
  where $\cL_\omega^+$ is the submodule fixed by complex
  conjugation (i.e., $\cL_\omega^+ = \cL\cap \R$).  When the period
  lattice is not rectangular, $\Omega_A$ generates $\cL_\omega^+$, and
  when it is rectangular, $\frac{1}{2}\Omega_A$ generates.  Thus $n
  \cdot c_A \cdot L(f,1)$ is an integer multiple of
  $\frac{1}{2}\Omega_A$, which proves the proposition.
\end{proof}

Proposition~\ref{prop:lratio1} can be more precise and generalized to
abelian varieties $A=A_f^{\vee}$ attached to newforms.  
One can also replace~$n$ by the order of the image of $(0)-(\infty)$
in $A(\Q)$.

\begin{theorem}[Agashe, Stein]\label{thm:lratio}
  Suppose $f\in S_2(\Gamma_1(N))$ is a newform and let $A=A_f^{\vee}$
  be the abelian variety attached to~$f$. Then we have the
  following equality of rational numbers:
$$
  \frac{|L(A,1)|}{\Omega_A}  = 
\frac{1}{c_\infty \cdot c_A}\cdot 
             [ \Phi(H_1(X_1(N),\Z))^+ : \Phi(\T\{0,\infty\})].
$$
Note that $L(A,1)\in\R$, so $|L(A,1)|=\pm L(A,1)$, and one expects, of course,
that $L(A,1)\geq 0$.
\end{theorem}
For $V$ and $W$ lattices in an $\R$-vector space~$M$, the {\em lattice index}
$[V:W]$ is by definition the absolute value of the determinant of a
change of basis taking a basis for~$V$ to a basis for~$W$, or $0$ if
$W$ has rank smaller than the dimension of~$M$.
\begin{proof}[Proof]
Let
$\tilde{\Omega}_A$ be
the measure of $A(\R)$ with respect to a basis
for $S_2(\Gamma_1(N),\Z)[I_f]$, where 
$I_f$ is the annihilator in $\T$ of~$f$.
Note that
$\tilde{\Omega}_A \cdot c_A = \Omega_A$,
where $c_A$ is the Manin index.
Unwinding the definitions, we find that
$$
\tilde{\Omega}_A
  = c_\infty \cdot [\Hom(S_2(\Gamma_1(N),\Z)[I_f],\Z) : \Phi(H_1(X_0(N),\Z))^+].
$$

For any ring~$R$ the pairing\edit{reference!}
$$\T_R \cross S_2(\Gamma_1(N),R) \ra R$$
given by $\langle T_n, f \rangle = a_1(T_n f)$
is perfect, so 
$
 (\T/I_f)\tensor R \isom \Hom(S_2(\Gamma_1(N),R)[I_f],R).
$
Using this pairing, we may view $\Phi$ as a map
$$
  \Phi : H_1(X_1(N),\Q) \ra (\T/I_f)\tensor \C,
$$
so that
$$
  \tilde{\Omega}_A = c_\infty \cdot [\T/I_f : \Phi(H_1(X_0(N),\Z))^+].
$$

Note that $(\T/I_f)\tensor\C$ is isomorphic as a ring to a product of
copies of $\C$, with one copy corresponding to each Galois conjugate $f_i$ of~$f$.
Let $\pi_i\in (\T/I_f)\tensor\C$ be the 
projector onto
the subspace of $(\T/I_f)\tensor\C$ corresponding to $f_i$.
Then 
$$\Phi(\{0,\infty\})\cdot \pi_i = L(f_i,1)\cdot \pi_i.$$
Since the $\pi_i$ form a basis for the complex vector space $(\T/I_f)\tensor\C$,
if we view $\Phi(\{0,\infty\})$ as the operator ``left-multiplication
by $\Phi(\{0,\infty\})$'', then
$$
 \det(\Phi(\{0,\infty\})) = \prod_i L(f_i,1) = L(A,1),
$$

Letting $H = H_1(X_0(N),\Z)$, we have
\begin{align*}
[\Phi(H)^+ : \Phi(\T \{0,\infty\})] &= [\Phi(H)^+ : (\T/I_f) \cdot \Phi(\{0,\infty\}) ] \\
       &= [\Phi(H)^+ : \T/I_f] \cdot [\T/I_f : \T/I_f\cdot \Phi(\{0,\infty\})]\\
       &= \frac{c_\infty}{\tilde{\Omega}_A} \cdot |\det(\Phi(\{0,\infty\}))|\\
       &= \frac{c_\infty c_A}{\Omega_A} \cdot |L(A,1)|,
\end{align*}
which proves the theorem.

\end{proof}

\begin{remark}
  Theorem~\ref{thm:lratio} is false, in general, when~$A$ is a
  quotient of $J_1(N)$ not attached to a single $\Gal(\Qbar/\Q)$-orbit
  of newforms.  It could be modified to handle this more general case,
  but the generalization seems not to has been written down.
\end{remark}




\section{General refined conjecture}

\begin{conjecture}[Birch and Swinnerton-Dyer]\label{conj:bsdgeneralmodular}
Let $r=\ord_{s=1} L(A,s)$.  Then $r$ is the rank of $A(\Q)$, the group
$\Sha(A)$ is finite, and 
$$
  \frac{L^{(r)}(A,1)}{r!}  = 
  \frac{\#\Sha(A)\cdot \Omega_A \cdot \Reg_A \cdot \prod_{p\mid N} c_p}
     {\#A(\Q)_{\tor}\cdot \#A^{\vee}(\Q)_{\tor}}.
$$
\end{conjecture}

\section{The Conjecture for non-modular abelian varieties}
\label{sec;bsdconjnonmod}
Conjecture~\ref{conj:bsdgeneralmodular} can be extended to general
abelian varieties over global fields.  Here we discuss only the case
of a general abelian variety~$A$ over~$\Q$.  We follow the discussion
in \cite[95-94]{lang:nt3} (Lang, Number Theory III)\edit{Remove
  paren.}, which describes Gross's formulation of the conjecture for
abelian varieties over number fields, and to which we refer the reader
for more details.

For each prime number~$\ell$, the 
$\ell$-adic {\em Tate module} associated to~$A$ is
$$
\Ta_{\ell}(A) =\varprojlim_{n} A(\Qbar)[\ell^n].
$$
Since $A(\Qbar)[\ell^n]\isom (\Z/\ell^n\Z)^{2\dim(A)}$, we
see that 
$\Ta_{\ell}(A)$ is free of rank $2\dim(A)$ as a $\Zl$-module.
Also, since the group structure on~$A$ is defined over~$\Q$,
$\Ta_{\ell}(A)$ comes equipped with an action
of $\Gal(\Qbar/\Q)$:
$$
  \rho_{A,\ell} : \Gal(\Qbar/\Q) \to \Aut(\Ta_{\ell}(A))\ncisom \GL_{2d}(\Z_\ell).
$$

Suppose~$p$ is a prime and let $\ell\neq p$ be another prime.  Fix any
embedding $\Qbar\hra \Qpbar$, and notice that restriction defines a
homorphism $r:\Gal(\Qpbar/\Qp)\to \Gal(\Qbar/\Q)$.  Let $G_p\subset
\Gal(\Qbar/\Q)$ be the image of~$r$.  The inertia group
$I_p\subset G_p$ is the kernel of the natural surjective reduction
map, and we have an exact sequence
$$
0\to I_p \to \Gal(\Qpbar/\Qp) \to \Gal(\Fpbar/\Fp)\to 0.
$$
The Galois group $\Gal(\Fpbar/\Fp)$ is isomorphic to $\Zhat$ with
canonical generator $x\mapsto x^p$.  Lifting this generator,
we obtain an element $\Frob_p\in\Gal(\Qpbar/\Qp)$, which
is well-defined up to an element of $I_p$.  Viewed as 
an element of $G_p\subset \Gal(\Qbar/\Q)$, the element
$\Frob_p$ is well-defined up $I_p$ and our choice of embedding
$\Qbar\hra \Qpbar$.  One can show that this implies that
$\Frob_p\in\Gal(\Qbar/\Q)$ is well-defined up to $I_p$ and
conjugation by an element of $\Gal(\Qbar/\Q)$.

For a $G_p$-module $M$, let
$$
M^{I_p} = \{x \in M : \sigma(x) = x\text{ all } \sigma\in I_p\}.
$$
Because $I_p$ acts trivially on $M^{I_p}$, the action of the
element $\Frob_p\in\Gal(\Qbar/\Q)$ on $M^{I_p}$ is well-defined up to
conjugation ($I_p$ acts trivially, so the ``up to $I_p$'' obstruction
vanishes).  Thus the characteristic polynomial of $\Frob_p$ on $M^{I_p}$
is well-defined, which is why $L_p(A,s)$ is well-defined.
The {\em local $L$-factor} of $L(A,s)$ at~$p$ is
$$
  L_p(A,s) =
\frac{1}{
       \det\left(I-p^{-s} 
              \Frob_p^{-1}|\Hom_{\Z_\ell}(\Ta_{\ell}(A),\Z_{\ell})^{I_p}\right)}.
$$


\begin{definition}
$\displaystyle{} L(A,s) = \prod_{\text{all }p} L_p(A,s)$
\end{definition}

For all but finitely many primes $\Ta_{\ell}(A)^{I_p} =
\Ta_{\ell}(A)$.  For example, if~$A=A_f$ is attached to a newform
$f=\sum a_n q^n$ of level~$N$ and $p\nmid \ell\cdot N$, then
$\Ta_{\ell}(A)^{I_p} = \Ta_{\ell}(A)$.  In this case, the
Eichler-Shimura relation implies that $L_p(A,s)$ equals $\prod
L_p(f_i,s)$, where the $f_i=\sum a_{n,i}q^n$ are the Galois conjugates
of~$f$ and $L_p(f_i,s) = (1 - a_{p,i} \cdot p^{-s} + p^{1-2s})^{-1}.$
The point is that Eichler-Shimura can be used to show that the
characteristic polynomial of $\Frob_p$ is $\prod_{i=1}^{\dim(A)} (X^2
- a_{p,i}X + p^{1-2s})$.  
\begin{theorem}
$L(A_f,s) = \prod_{i=1}^d L(f_i,s)$.
\end{theorem}


\section{Visibility of Shafarevich-Tate groups}
Let $K$ be a number field.  Suppose 
\[
  0 \to A \to B \to C \to 0
\]
is an exact sequence of abelian varieties over~$K$.  (Thus each
of~$A$,~$B$, and~$C$ is a complete group variety over~$K$, whose group
is automatically abelian.)  Then there is a corresponding long exact
sequence of cohomology for the group $\Gal(\Qbar/K)$:
\[
  0 \to A(K) \to B(K) \to C(K) \xra{\delta} \H^1(K,A) \to \H^1(K,B)\to 
    \H^1(K,C) \to \cdots
\]

The study of the Mordell-Weil group $C(K)=\H^0(K,C)$ is popular in
arithmetic geometry.  For example, the Birch and Swinnerton-Dyer
conjecture (BSD conjecture), which is one of the million dollar Clay
Math Problems, asserts that the dimension of $C(K)\tensor\Q$ equals
the ordering vanishing of $L(C,s)$ at $s=1$.

The group $\H^1(K,A)$ is also of interest in connection with
the BSD conjecture, because it contains
the Shafarevich-Tate group
\[
  \Sha(A) = \Sha(A/K) = 
   \Ker\left(\H^1(K,A)\to \bigoplus_{v} \H^1(K_v,A)\right) \subset \H^1(K,A),
\]
where the sum is over all places~$v$ of~$K$ (e.g., when $K=\Q$, the
fields $K_v$ are $\Q_p$ for all prime numbers~$p$ and
$\Q_{\infty}=\R$).  

The group $A(K)$ is fundamentally different than $\H^1(K,C)$.  The
Mordell-Weil group $A(K)$ is finitely generated, whereas the first
Galois cohomology $\H^1(K,C)$ is far from being finitely
generated---in fact, every element has finite order and there are
infinitely many elements of any given order.

This talk is about ``dimension shifting'', i.e., relating information
about $\H^0(K,C)$ to information about $\H^1(K,A)$.

\subsection{Definitions}
Elements of $\H^0(K,C)$ are simply points, i.e., elements of $C(K)$,
so they are relatively easy to ``visualize''.  In contrast, elements
of $\H^1(K, A)$ are Galois cohomology classes, i.e., equivalence
classes of set-theoretic (continuous) maps $f:\Gal(\Qbar/K)\to
A(\Qbar)$ such that $f(\sigma\tau) = f(\sigma) + \sigma f(\tau)$.  Two
maps are equivalent if their difference is a map of the form
$\sigma\mapsto \sigma(P)-P$ for some fixed $P\in A(\Qbar)$.  From this
point of view $\H^1$ is more mysterious than $\H^0$.

There is an alternative way to view elements of $\H^1(K,A)$. The WC
group of~$A$ is the group of isomorphism classes of principal
homogeneous spaces for~$A$, where a principal homogeneous space is a
variety~$X$ and a map $A\times X\to X$ that satisfies the same axioms
as those for a simply transitive group action.  Thus~$X$ is a twist as
variety of~$A$, but $X(K)=\emptyset$, unless~$X\ncisom A$.  Also, the
nontrivial elements of $\Sha(A)$ correspond to the classes in WC that
have a $K_v$-rational point for all places~$v$, but no $K$-rational
point.

Mazur introduced the following definition in order to help unify
diverse constructions of principal homogeneous spaces:
\begin{definition}[Visible]
The {\em visible subgroup} of $\H^1(K,A)$ in~$B$ is 
\begin{align*}
  \Vis_B\H^1(K,A) &= \Ker(\H^1(K,A)\to \H^1(K,B))\\
                  &= \Coker(B(K)\to C(K)).
\end{align*}      
\end{definition}

\begin{remark}
Note that $\Vis_B\H^1(K,A)$ {\em does} depend on the embedding of~$A$
into~$B$.  For example, suppose $B=B_1\times A$.  Then there could be
nonzero visible elements if~$A$ is embedding into the first factor,
but there will be no nonzero visible elements if~$A$ is embedded into
the second factor.  Here we are using that $\H^1(K, B_1\times A) =
\H^1(K,B_1)\oplus \H^1(K,A).$
\end{remark}

The connection with the WC group of~$A$ is as follows. 
Suppose 
\[
  0 \to A \xrightarrow{f} B \xrightarrow{g} C \to 0
\]
is an exact sequence of abelian varieties and that $c\in \H^1(K,A)$ is
visible in~$B$.  Thus there exists $x\in C(K)$ such that $\delta(x) =
c$, where $\delta:C(K)\to \H^1(K,A)$ is the connecting homomorphism.
Then $X=\pi^{-1}(x)\subset B$ is a translate of $A$ in~$B$, so the
group law on~$B$ gives~$X$ the structure of principal homogeneous
space for~$A$, and one can show that the class of~$X$ in the WC group
of~$A$ corresponds to~$c$.

\begin{lemma}
The group $\Vis_B\H^1(K,A)$ is finite.
\end{lemma}
\begin{proof}
  Since $\Vis_B\H^1(K,A)$ is a homomorphic image of the finitely
  generated group $C(K)$, it is also finitely generated.  On the other
  hand, it is a subgroup of $\H^1(K,A)$, so it is a torsion group.
  The lemma follows since a finitely generated torsion abelian group
  is finite.
\end{proof}

\subsection{Every element of $\H^1(K,A)$ is visible somewhere}

\begin{proposition}\label{prop:allvish1}
Let $c\in\H^1(K,A)$.  Then there exists an abelian variety~$B=B_c$ and
an embedding $A\hra B$ such that~$c$ is visible in~$B$.  
\end{proposition}
\begin{proof}
  By definition of Galois cohomology, there is a finite extension~$L$
  of~$K$ such that $\res_L(c)=0$.  Thus $c$ maps to $0$ in
  $\H^1(L,A_L)$.  By a slight generalization of the Shapiro Lemma from
  group cohomology (which can be proved by dimension shifting; see,
  e.g.,\edit{Fix} Atiyah-Wall in Cassels-Frohlich), there is a
  canonical isomorphism
  \[
  \H^1(L,A_L) \isom \H^1(K,\Res_{L/K}(A_L)) = \H^1(K,B),
  \]
  where $B=\Res_{L/K}(A_L)$ is the Weil restriction of scalars of
  $A_L$ back down to~$K$.  The restriction of scalars~$B$ is an
  abelian variety of dimension $[L:K]\cdot \dim A$ that is
  characterized by the existence of functorial isomorphisms
  \[ 
   \Mor_K(S,B) \isom \Mor_L(S_L, A_L),
  \]
  for any $K$-scheme~$S$, i.e., $B(S)=A_L(S_L)$.  In particular,
  setting~$S=A$ we find that the identity map $A_L\to A_L$ corresponds
  to an injection $A\hra B$.  Moreover,
  $c\mapsto\res_L(c)=0\in\H^1(K,B)$.
\end{proof}

\begin{remark}
  The abelian variety $B$ in Proposition~\ref{prop:allvish1} is a
  twist of a power of~$A$.
\end{remark}

\subsection{Visibility in the context of modularity}
Usually we focus on visibility of elements in $\Sha(A)$.  There are a
number of other results about visibility in various special cases, and
large tables of examples in the context of elliptic curves and modular
abelian varieties.  There are also interesting modularity questions
and conjectures in this context. 

Motivated by the desire to understand the Birch and Swinnerton-Dyer
conjecture more explicitly, I developed\edit{change.}  (with
significant input from Agashe, Cremona, Mazur, and Merel)
computational techniques for unconditionally constructing
Shafarevich-Tate groups of modular abelian varieties $A\subset J_0(N)$
(or $J_1(N)$).  For example, if $A\subset J_0(389)$ is the
$20$-dimensional simple factor, then
\[ 
  \Z/5\Z\times \Z/5\Z\subset \Sha(A),
\]
as predicted by the Birch and Swinnerton-Dyer conjecture.  See
\cite{cremona-mazur} for examples when $\dim A=1$.  We will spend the
rest of this section discussing the examples of
\cite{agashe-stein:bsd, agashe-stein:visibility} in more detail.

Tables~\ref{t1}--\ref{t4} illustrate the main computational results of
\cite{agashe-stein:bsd}.  These tables were made by gathering data
about certain arithmetic invariants of the $19608$ abelian varieties
$A_f$ of level $\leq 2333$.  Of these, exactly $10360$ have satisfy
$L(A_f,1)\neq 0$, and for these with $L(A_f,1)\neq 0$, we compute a
divisor and multiple of the conjectural order of~$\Sha(A_f)$.  We find
that there are at least $168$ such that the Birch and Swinnerton-Dyer
Conjecture implies that $\Sha(A_f)$ is divisible by an odd prime, and
we prove for $37$ of these that the odd part of the conjectural order
of $\Sha(A_f)$ really divides $\#\Sha(A_f)$ by constructing nontrivial
elements of $\Sha(A_f)$ using visibility.

The meaning of the tables is as follows.  The first column lists a
level~$N$ and an isogeny class, which uniquely specifies an abelian
variety $A=A_f\subset J_0(N)$.  The $n$th isogeny class is given by
the $n$th letter of the alphabet. We will not discuss the ordering
further, except to note that usually, the dimension of $A$, which is
given in the second column, is enough to determine $A$.  When
$L(A,1)\neq 0$, Conjecture~\ref{conj:bsd0} predicts that
$$
\#\Sha(A) \stackrel{?}{=} 
\frac{L(A,1)}{\Omega_A}\cdot\frac{\#A(\Q)_{\tor}
\cdot \#A^{\vee}(\Q)_{\tor}}{\prod_{p\mid N} c_p}.
$$
\renewcommand{\ab}{A\cap B}
\newcommand{\mdeg}{\text{odd}\deg(\vphi_A)} 

We view the quotient $L(A,1)/\Omega_A$, which is a rational number, as
a single quantity.  We can compute multiples and divisors of every
quantity appearing in the right hand side of this equation, and this
yields columns three and four, which are a divisor $S_\ell$ and a
multiple $S_u$ of the conjectural order of $\Sha(A)$ (when
$S_u=S_\ell$, we put an equals sign in the $S_u$ column).  Column
five, which is labeled $\mdeg$, contains the odd part of the degree of
the polarization
\begin{equation}\label{eqn:vphi}
 \vphi_A : (A \hra J_0(N) \isom J_0(N)^{\vee} \to A^{\vee}).
\end{equation}
The second set of columns, columns six and seven, contain an abelian
variety $B=B_g\subset J_0(N)$ such that $\#(A\meet B)$ is divisible by
an odd prime divisor of $S_\ell$ and $L(B,1)=0$. When $\dim(B)=1$, we
have verified that $B$ is an elliptic curve of rank~$2$.  The eighth
column $\ab$ contains the group structure of $A\meet B$, where e.g.,
$[2^2 302^2]$ is shorthand notation for $(\Z/2\Z)^2 \oplus
(\Z/302\Z)^2$.  The final column, labeled $\Vis$, contains a divisor
of the order of $\Vis_{A+B}(\Sha(A))$.

The following proposition explains the significance of the $\mdeg$ column.
\begin{proposition}
If $p\nmid \deg(\vphi_A)$, then $p\nmid \Vis_{J_0(N)}(\H^1(\Q,A))$.
\end{proposition}
\begin{proof}
There exists a complementary morphism $\hat{\vphi}_A$, such that
$\vphi_A\circ \hat{\vphi}_A = \hat{\vphi}_A\circ \vphi_A = [n]$,
where $n$ is the degree of $\vphi_A$.  If $c\in\H^1(\Q,A)$ maps to~$0$
in $\H^1(\Q,J_0(N))$, then it also maps to $0$ under
the following composition
$$
\H^1(\Q,A) \to \H^1(\Q,J_0(N)) \to  \H^1(\Q,A^{\vee}) \xra{\hat{\vphi}_A} \H^1(\Q,A).
$$
Since this composition is $[n]$, it follows that
$c\in\H^1(\Q,A)[n]$, which proves the proposition.
\end{proof}

\begin{remark}
Since the degree of $\vphi_A$ does not change if we extend scalars to 
a number field~$K$, the subgroup of $\H^1(K,A)$ visible in $J_0(N)_K$,
still has order divisible only by primes that divide $\deg(\vphi_A)$.
\end{remark}

The following theorem explains the significance of the~$B$ column, and how
it was used to deduce the $\Vis$ column.
\begin{theorem}
  Suppose~$A$ and~$B$ are abelian subvarieties of an abelian
  variety~$C$ over~$\Q$ and that $A(\Qbar)\intersect B(\Qbar)$ is
  finite.  Assume also that $A(\Q)$ is finite.  Let~$N$ be an integer
  divisible by the residue characteristics of primes of bad reduction
  for~$C$ (e.g., $N$ could be the conductor of~$C$).  Suppose~$p$ is a
  prime such that
  $$p\nmid 2\cdot N \cdot
  \#((A+B)/B)(\Q)_{\tor}\cdot\#B(\Q)_{\tor}\cdot \prod_{\ell}
  c_{A,\ell}\cdot c_{B,\ell},$$
  where $c_{A,\ell} =
  \#\Phi_{A,\ell}(\F_\ell)$ is the Tamagawa number of~$A$ at $\ell$ (and
  similarly for~$B$).  Suppose furthermore that $B(\Qbar)[p] \subset
  A(\Qbar)$ as subgroups of $C(\Qbar)$.  Then there is a natural
  injection
$$
     B(\Q)/pB(\Q)\hra \Vis_C(\Sha(A)).
$$
\end{theorem}
A complete proof of a generalization of this theorem can be found in
\cite{agashe-stein:visibility}.  
\begin{proof}[Sketch of Proof]
  Without loss of generality, we may assume $C=A+B$.  Our hypotheses
  yield a diagram
$$
\xymatrix{
   0 \ar[r] & B[p] \ar[r]\ar[d] & B \ar[r]^{p}\ar[d]& B \ar[r]\ar@{.>}[d] & 0\\
   0 \ar[r] & A \ar[r] &    C \ar[r] & B'\ar[r] & 0,
}
$$
where $B'=C/A$.  Taking $\Gal(\Qbar/\Q)$-cohomology, we obtain the
following diagram:
$$
\xymatrix{
   0 \ar[r] & B(\Q) \ar[r]^{p}\ar[d]& B(\Q) \ar[r]\ar[d] & B(\Q)/p B(\Q) \ar[r]\ar@{.>}[d] & 0\\
   0 \ar[r] & C(\Q)/A(\Q) \ar[r] & B'(\Q) \ar[r] & \Vis_C(\H^1(\Q,A)) \ar[r] & 0.
}
$$
The snake lemma and our hypothesis that $p\nmid \#(C/B)(\Q)_{\tor}$ imply
that the rightmost vertical map is an injection 
\begin{equation}\label{eqn:inj1}
 i: B(\Q)/p B(\Q) \hra \Vis_C(\H^1(\Q,A)),
\end{equation}
since $C(A)/(A(\Q)+B(\Q))$ is a sub-quotient of $(C'/B)(\Q)$.  

We show that the image of (\ref{eqn:inj1}) lies in $\Sha(A)$ using a
local analysis at each prime, which we now sketch.  At the archimedian
prime, no work is needed since $p\neq 2$.  At non-archimedian primes
$\ell$, one uses facts about N\'eron models (when $\ell=p$) and our
hypothesis that $p$ does not divide the Tamagawa numbers of~$B$ (when
$\ell\neq p$) to show that if $x\in B(\Q)/p B(\Q)$, then the
corresponding cohomology class $\res_{\ell}(i(x))\in \H^1(\Q_\ell,A)$ splits over the
maximal unramified extension.  However,
$$
  \H^1(\Q^{\ur}_\ell/\Q_\ell,A) \isom \H^1(\Fbar_\ell/\F_\ell, \Phi_{A,\ell}(\Fbar_\ell)),
$$
and the right hand cohomology group has order $c_{A,\ell}$, which is coprime to~$p$.
Thus~$\res_{\ell}(i(x))=0$, which completes the sketch of the proof.
\end{proof}

\subsection{Future directions}
The data in Tables~\ref{t1}-\ref{t4}
could be investigated further.  

It should be possible to replace the hypothesis that $B[p]\subset A$,
with the weaker hypothesis that $B[\m]\subset A$, where~$\m$ is a
maximal ideal of the Hecke algebra~$\T$.  For example, this
improvement would help one to show that $5^2$ divides the order of the
Shafarevich-Tate group of $\mathbf{1041E}$.  Note that for this
example, we only know that $L(B,1)=0$, not that $B(\Q)$ has positive
rank (as predicted by Conjecture~\ref{conj:bsdrank}), which is another
obstruction.

One can consider visibility at a higher level.  For example, there are
elements of order~$3$ in the Shafarevich-Tate group of $\mathbf{551H}$
that are not visible in $J_0(551)$, but these elements are visible in
$J_0(2\cdot 551)$, according to the computations in
\cite{stein:bsdmagma} (Studying the Birch and Swinnerton-Dyer
  Conjecture for Modular Abelian Varieties Using MAGMA).\edit{remove}
\begin{conjecture}[Stein]
  Suppose $c\in\Sha(A_f)$, where $A_f\subset J_0(N)$.  Then there
  exists~$M$ such that~$c$ is visible in $J_0(NM)$.  In other words,
  every element of $\Sha(A_f)$ is ``modular''.
\end{conjecture}


\begin{table}
\caption{Visibility of Nontrivial Odd Parts of Shafarevich-Tate Groups\label{t1}}
\begin{center}
$\begin{array}{|l@{}ccc@{}c|l@{}c@{}|cc|}\hline
\quad A& \dim& S_l & S_u & \mdeg
    & \quad B  & \dim\, & \,\,\ab & \Vis\\ \hline

\mathbf{389E}*&20&5^{2}&=&5&\mathbf{389A}&1&[20^{2}]&5^{2} \\
\mathbf{433D}*&16&7^{2}&=&7\!\cdot\!\mbox{\tiny $111$}&\mathbf{433A}&1&[14^{2}]&7^{2} \\
\mathbf{446F}*&8&11^{2}&=&11\!\cdot\!\mbox{\tiny $359353$}&\mathbf{446B}&1&[11^{2}]&11^{2} \\
\mathbf{551H}&18&3^{2}&=&\mbox{\tiny $169$}&\text{NONE} & & & \\
\hline
\mathbf{563E}*&31&13^{2}&=&13&\mathbf{563A}&1&[26^{2}]&13^{2} \\
\mathbf{571D}*&2&3^{2}&=&3^{2}\!\cdot\!\mbox{\tiny $127$}&\mathbf{571B}&1&[3^{2}]&3^{2} \\
\mathbf{655D}*&13&3^{4}&=&3^{2}\!\cdot\!\mbox{\tiny $9799079$}&\mathbf{655A}&1&[36^{2}]&3^{4} \\
\mathbf{681B}&1&3^{2}&=&3\!\cdot\!\mbox{\tiny $125$}&\mathbf{681C}&1&[3^{2}]&- \\
\hline 
\mathbf{707G}*&15&13^{2}&=&13\!\cdot\!\mbox{\tiny $800077$}&\mathbf{707A}&1&[13^{2}]&13^{2} \\
\mathbf{709C}*&30&11^{2}&=&11&\mathbf{709A}&1&[22^{2}]&11^{2} \\
\mathbf{718F}*&7&7^{2}&=&7\!\cdot\!\mbox{\tiny $5371523$}&\mathbf{718B}&1&[7^{2}]&7^{2} \\
\mathbf{767F}&23&3^{2}&=&\mbox{\tiny $1$}&\text{NONE} & & & \\
\hline
\mathbf{794G}&12&11^{2}&=&11\!\cdot\!\mbox{\tiny $34986189$}&\mathbf{794A}&1&[11^{2}]&- \\
\mathbf{817E}&15&7^{2}&=&7\!\cdot\!\mbox{\tiny $79$}&\mathbf{817A}&1&[7^{2}]&- \\
\mathbf{959D}&24&3^{2}&=&\mbox{\tiny $583673$}&\text{NONE} & & & \\
\mathbf{997H}*&42&3^{4}&=&3^{2}&\mathbf{997B}&1&[12^{2}]&3^{2} \\
\hline
&&& && \mathbf{997C}&1&[24^{2}]&3^{2} \\
\mathbf{1001F}&3&3^{2}&=&3^{2}\!\cdot\!\mbox{\tiny $1269$}&\mathbf{1001C}&1&[3^{2}]&- \\
&&& && \mathbf{91A}&1&[3^{2}]&- \\
\mathbf{1001L}&7&7^{2}&=&7\!\cdot\!\mbox{\tiny $2029789$}&\mathbf{1001C}&1&[7^{2}]&- \\
\hline
\mathbf{1041E}&4&5^{2}&=&5^{2}\!\cdot\!\mbox{\tiny $13589$}&\mathbf{1041B}&2&[5^{2}]&- \\
\mathbf{1041J}&13&5^{4}&=&5^{3}\!\cdot\!\mbox{\tiny $21120929983$}&\mathbf{1041B}&2&[5^{4}]&- \\
\mathbf{1058D}&1&5^{2}&=&5\!\cdot\!\mbox{\tiny $483$}&\mathbf{1058C}&1&[5^{2}]&- \\
\mathbf{1061D}&46&151^{2}&=&151\!\cdot\!\mbox{\tiny $10919$}&\mathbf{1061B}&2&[2^{2}302^{2}]&- \\
\hline
\mathbf{1070M}&7&3 \!\cdot\! 5^{2}&3^{2} \!\cdot\! 5^{2}&3 \!\cdot\! 5\!\cdot\!\mbox{\tiny $1720261$}&\mathbf{1070A}&1&[15^{2}]&- \\
\mathbf{1077J}&15&3^{4}&=&3^{2}\!\cdot\!\mbox{\tiny $1227767047943$}&\mathbf{1077A}&1&[9^{2}]&- \\
\mathbf{1091C}&62&7^{2}&=&\mbox{\tiny $1$}&\text{NONE} & & & \\
\mathbf{1094F}*&13&11^{2}&=&11^{2}\!\cdot\!\mbox{\tiny $172446773$}&\mathbf{1094A}&1&[11^{2}]&11^{2} \\
\hline
\mathbf{1102K}&4&3^{2}&=&3^{2}\!\cdot\!\mbox{\tiny $31009$}&\mathbf{1102A}&1&[3^{2}]&- \\
\mathbf{1126F}*&11&11^{2}&=&11\!\cdot\!\mbox{\tiny $13990352759$}&\mathbf{1126A}&1&[11^{2}]&11^{2} \\
\mathbf{1137C}&14&3^{4}&=&3^{2}\!\cdot\!\mbox{\tiny $64082807$}&\mathbf{1137A}&1&[9^{2}]&- \\
\mathbf{1141I}&22&7^{2}&=&7\!\cdot\!\mbox{\tiny $528921$}&\mathbf{1141A}&1&[14^{2}]&- \\
\hline
\mathbf{1147H}&23&5^{2}&=&5\!\cdot\!\mbox{\tiny $729$}&\mathbf{1147A}&1&[10^{2}]&- \\
\mathbf{1171D}*&53&11^{2}&=&11\!\cdot\!\mbox{\tiny $81$}&\mathbf{1171A}&1&[44^{2}]&11^{2} \\
\mathbf{1246B}&1&5^{2}&=&5\!\cdot\!\mbox{\tiny $81$}&\mathbf{1246C}&1&[5^{2}]&- \\
\mathbf{1247D}&32&3^{2}&=&3^{2}\!\cdot\!\mbox{\tiny $2399$}&\mathbf{43A}&1&[36^{2}]&- \\
\hline
\mathbf{1283C}&62&5^{2}&=&5\!\cdot\!\mbox{\tiny $2419$}&\text{NONE} & & & \\
\mathbf{1337E}&33&3^{2}&=&\mbox{\tiny $71$}&\text{NONE} & & & \\
\mathbf{1339G}&30&3^{2}&=&\mbox{\tiny $5776049$}&\text{NONE} & & & \\
\mathbf{1355E}&28&3&3^{2}&3^{2}\!\cdot\!\mbox{\tiny $2224523985405$}&\text{NONE} & & & \\
\hline
\mathbf{1363F}&25&31^{2}&=&31\!\cdot\!\mbox{\tiny $34889$}&\mathbf{1363B}&2&[2^{2}62^{2}]&- \\
\mathbf{1429B}&64&5^{2}&=&\mbox{\tiny $1$}&\text{NONE} & & & \\
\mathbf{1443G}&5&7^{2}&=&7^{2}\!\cdot\!\mbox{\tiny $18525$}&\mathbf{1443C}&1&[7^{1}14^{1}]&- \\
\mathbf{1446N}&7&3^{2}&=&3\!\cdot\!\mbox{\tiny $17459029$}&\mathbf{1446A}&1&[12^{2}]&- \\
\hline

\end{array}$
\end{center}
\end{table}


\begin{table}
\caption{Visibility of Nontrivial Odd Parts of Shafarevich-Tate Groups\label{t2}
}
\begin{center}
$\begin{array}{|l@{}ccc@{}c|l@{}c@{}|cc|}\hline
\quad A& \dim& S_l & S_u & \mdeg
    & \quad B  & \dim\, & \,\,\ab & \Vis\\ \hline

\mathbf{1466H}*&23&13^{2}&=&13\!\cdot\!\mbox{\tiny $25631993723$}&\mathbf{1466B}&1&[26^{2}]&13^{2} \\
\mathbf{1477C}*&24&13^{2}&=&13\!\cdot\!\mbox{\tiny $57037637$}&\mathbf{1477A}&1&[13^{2}]&13^{2} \\
\mathbf{1481C}&71&13^{2}&=&\mbox{\tiny $70825$}&\text{NONE} & & & \\
\mathbf{1483D}*&67&3^{2} \!\cdot\! 5^{2}&=&3 \!\cdot\! 5&\mathbf{1483A}&1&[60^{2}]&3^{2} \!\cdot\! 5^{2} \\
\hline
\mathbf{1513F}&31&3&3^{4}&3\!\cdot\!\mbox{\tiny $759709$}&\text{NONE} & & & \\
\mathbf{1529D}&36&5^{2}&=&\mbox{\tiny $535641763$}&\text{NONE} & & & \\
\mathbf{1531D}&73&3&3^{2}&3&\mathbf{1531A}&1&[48^{2}]&- \\
\mathbf{1534J}&6&3&3^{2}&3^{2}\!\cdot\!\mbox{\tiny $635931$}&\mathbf{1534B}&1&[6^{2}]&- \\
\hline
\mathbf{1551G}&13&3^{2}&=&3\!\cdot\!\mbox{\tiny $110659885$}&\mathbf{141A}&1&[15^{2}]&- \\
\mathbf{1559B}&90&11^{2}&=&\mbox{\tiny $1$}&\text{NONE} & & & \\
\mathbf{1567D}&69&7^{2} \!\cdot\! 41^{2}&=&7 \!\cdot\! 41&\mathbf{1567B}&3&[4^{4}1148^{2}]&- \\
\mathbf{1570J}*&6&11^{2}&=&11\!\cdot\!\mbox{\tiny $228651397$}&\mathbf{1570B}&1&[11^{2}]&11^{2} \\
\hline
\mathbf{1577E}&36&3&3^{2}&3^{2}\!\cdot\!\mbox{\tiny $15$}&\mathbf{83A}&1&[6^{2}]&- \\
\mathbf{1589D}&35&3^{2}&=&\mbox{\tiny $6005292627343$}&\text{NONE} & & & \\
\mathbf{1591F}*&35&31^{2}&=&31\!\cdot\!\mbox{\tiny $2401$}&\mathbf{1591A}&1&[31^{2}]&31^{2} \\
\mathbf{1594J}&17&3^{2}&=&3\!\cdot\!\mbox{\tiny $259338050025131$}&\mathbf{1594A}&1&[12^{2}]&- \\
\hline
\mathbf{1613D}*&75&5^{2}&=&5\!\cdot\!\mbox{\tiny $19$}&\mathbf{1613A}&1&[20^{2}]&5^{2} \\
\mathbf{1615J}&13&3^{4}&=&3^{2}\!\cdot\!\mbox{\tiny $13317421$}&\mathbf{1615A}&1&[9^{1}18^{1}]&- \\
\mathbf{1621C}*&70&17^{2}&=&17&\mathbf{1621A}&1&[34^{2}]&17^{2} \\
\mathbf{1627C}*&73&3^{4}&=&3^{2}&\mathbf{1627A}&1&[36^{2}]&3^{4} \\
\hline
\mathbf{1631C}&37&5^{2}&=&\mbox{\tiny $6354841131$}&\text{NONE} & & & \\
\mathbf{1633D}&27&3^{6} \!\cdot\! 7^{2}&=&3^{5} \!\cdot\! 7\!\cdot\!\mbox{\tiny $31375$}&\mathbf{1633A}&3&[6^{4}42^{2}]&- \\
\mathbf{1634K}&12&3^{2}&=&3\!\cdot\!\mbox{\tiny $3311565989$}&\mathbf{817A}&1&[3^{2}]&- \\
\mathbf{1639G}*&34&17^{2}&=&17\!\cdot\!\mbox{\tiny $82355$}&\mathbf{1639B}&1&[34^{2}]&17^{2} \\
\hline
\mathbf{1641J}*&24&23^{2}&=&23\!\cdot\!\mbox{\tiny $1491344147471$}&\mathbf{1641B}&1&[23^{2}]&23^{2} \\
\mathbf{1642D}*&14&7^{2}&=&7\!\cdot\!\mbox{\tiny $123398360851$}&\mathbf{1642A}&1&[7^{2}]&7^{2} \\
\mathbf{1662K}&7&11^{2}&=&11\!\cdot\!\mbox{\tiny $16610917393$}&\mathbf{1662A}&1&[11^{2}]&- \\
\mathbf{1664K}&1&5^{2}&=&5\!\cdot\!\mbox{\tiny $7$}&\mathbf{1664N}&1&[5^{2}]&- \\
\hline
\mathbf{1679C}&45&11^{2}&=&\mbox{\tiny $6489$}&\text{NONE} & & & \\
\mathbf{1689E}&28&3^{2}&=&3\!\cdot\!\mbox{\tiny $172707180029157365$}&\mathbf{563A}&1&[3^{2}]&- \\
\mathbf{1693C}&72&1301^{2}&=&1301&\mathbf{1693A}&3&[2^{4}2602^{2}]&- \\
\mathbf{1717H}*&34&13^{2}&=&13\!\cdot\!\mbox{\tiny $345$}&\mathbf{1717B}&1&[26^{2}]&13^{2} \\ \hline
\mathbf{1727E}&39&3^{2}&=&\mbox{\tiny $118242943$}&\text{NONE} & & & \\
\mathbf{1739F}&43&659^{2}&=&659\!\cdot\!\mbox{\tiny $151291281$}&\mathbf{1739C}&2&[2^{2}1318^{2}]&- \\
\mathbf{1745K}&33&5^{2}&=&5\!\cdot\!\mbox{\tiny $1971380677489$}&\mathbf{1745D}&1&[20^{2}]&- \\
\mathbf{1751C}&45&5^{2}&=&5\!\cdot\!\mbox{\tiny $707$}&\mathbf{103A}&2&[505^{2}]&- \\
\hline
\mathbf{1781D}&44&3^{2}&=&\mbox{\tiny $61541$}&\text{NONE} & & & \\
\mathbf{1793G}*&36&23^{2}&=&23\!\cdot\!\mbox{\tiny $8846589$}&\mathbf{1793B}&1&[23^{2}]&23^{2} \\
\mathbf{1799D}&44&5^{2}&=&\mbox{\tiny $201449$}&\text{NONE} & & & \\
\mathbf{1811D}&98&31^{2}&=&\mbox{\tiny $1$}&\text{NONE} & & & \\
\hline
\mathbf{1829E}&44&13^{2}&=&\mbox{\tiny $3595$}&\text{NONE} & & & \\
\mathbf{1843F}&40&3^{2}&=&\mbox{\tiny $8389$}&\text{NONE} & & & \\
\mathbf{1847B}&98&3^{6}&=&\mbox{\tiny $1$}&\text{NONE} & & & \\
\mathbf{1871C}&98&19^{2}&=&\mbox{\tiny $14699$}&\text{NONE} & & & \\
\hline

\end{array}$
\end{center}
\end{table}

\begin{table}
\caption{Visibility of Nontrivial Odd Parts of Shafarevich-Tate Groups\label{t3}
}
\begin{center}
$\begin{array}{|l@{}ccc@{}c|l@{}c@{}|cc|}\hline
\quad A& \dim& S_l & S_u & \mdeg
    & \quad B  & \dim\, & \,\,\ab & \Vis\\ \hline

\mathbf{1877B}&86&7^{2}&=&\mbox{\tiny $1$}&\text{NONE} & & & \\
\mathbf{1887J}&12&5^{2}&=&5\!\cdot\!\mbox{\tiny $10825598693$}&\mathbf{1887A}&1&[20^{2}]&- \\
\mathbf{1891H}&40&7^{4}&=&7^{2}\!\cdot\!\mbox{\tiny $44082137$}&\mathbf{1891C}&2&[4^{2}196^{2}]&- \\
\mathbf{1907D}*&90&7^{2}&=&7\!\cdot\!\mbox{\tiny $165$}&\mathbf{1907A}&1&[56^{2}]&7^{2} \\
\hline
\mathbf{1909D}*&38&3^{4}&=&3^{2}\!\cdot\!\mbox{\tiny $9317$}&\mathbf{1909A}&1&[18^{2}]&3^{4} \\
\mathbf{1913B}*&1&3^{2}&=&3\!\cdot\!\mbox{\tiny $103$}&\mathbf{1913A}&1&[3^{2}]&3^{2} \\
\mathbf{1913E}&84&5^{4} \!\cdot\! 61^{2}&=&5^{2} \!\cdot\! 61\!\cdot\!\mbox{\tiny $103$}&\mathbf{1913A}&1&[10^{2}]&- \\
&&& && \mathbf{1913C}&2&[2^{2}610^{2}]&- \\
\hline
\mathbf{1919D}&52&23^{2}&=&\mbox{\tiny $675$}&\text{NONE} & & & \\
\mathbf{1927E}&45&3^{2}&3^{4}&\mbox{\tiny $52667$}&\text{NONE} & & & \\
\mathbf{1933C}&83&3^{2} \!\cdot\! 7&3^{2} \!\cdot\! 7^{2}&3 \!\cdot\! 7&\mathbf{1933A}&1&[42^{2}]&3^{2} \\
\mathbf{1943E}&46&13^{2}&=&\mbox{\tiny $62931125$}&\text{NONE} & & & \\
\hline
\mathbf{1945E}*&34&3^{2}&=&3\!\cdot\!\mbox{\tiny $571255479184807$}&\mathbf{389A}&1&[3^{2}]&3^{2} \\
\mathbf{1957E}*&37&7^{2} \!\cdot\! 11^{2}&=&7 \!\cdot\! 11\!\cdot\!\mbox{\tiny $3481$}&\mathbf{1957A}&1&[22^{2}]&11^{2} \\
&&& && \mathbf{1957B}&1&[14^{2}]&7^{2} \\
\mathbf{1979C}&104&19^{2}&=&\mbox{\tiny $55$}&\text{NONE} & & & \\
\hline
\mathbf{1991C}&49&7^{2}&=&\mbox{\tiny $1634403663$}&\text{NONE} & & & \\
\mathbf{1994D}&26&3&3^{2}&3^{2}\!\cdot\!\mbox{\tiny $46197281414642501$}&\mathbf{997B}&1&[3^{2}]&- \\
\mathbf{1997C}&93&17^{2}&=&\mbox{\tiny $1$}&\text{NONE} & & & \\
\mathbf{2001L}&11&3^{2}&=&3^{2}\!\cdot\!\mbox{\tiny $44513447$}&\text{NONE} & & & \\
\hline
\mathbf{2006E}&1&3^{2}&=&3\!\cdot\!\mbox{\tiny $805$}&\mathbf{2006D}&1&[3^{2}]&- \\
\mathbf{2014L}&12&3^{2}&=&3^{2}\!\cdot\!\mbox{\tiny $126381129003$}&\mathbf{106A}&1&[9^{2}]&- \\
\mathbf{2021E}&50&5^{6}&=&5^{2}\!\cdot\!\mbox{\tiny $729$}&\mathbf{2021A}&1&[100^{2}]&5^{4} \\
\mathbf{2027C}*&94&29^{2}&=&29&\mathbf{2027A}&1&[58^{2}]&29^{2} \\
\hline
\mathbf{2029C}&90&5^{2} \!\cdot\! 269^{2}&=&5 \!\cdot\! 269&\mathbf{2029A}&2&[2^{2}2690^{2}]&- \\
\mathbf{2031H}*&36&11^{2}&=&11\!\cdot\!\mbox{\tiny $1014875952355$}&\mathbf{2031C}&1&[44^{2}]&11^{2} \\
\mathbf{2035K}&16&11^{2}&=&11\!\cdot\!\mbox{\tiny $218702421$}&\mathbf{2035C}&1&[11^{1}22^{1}]&- \\
\mathbf{2038F}&25&5&5^{2}&5^{2}\!\cdot\!\mbox{\tiny $92198576587$}&\mathbf{2038A}&1&[20^{2}]&- \\
\hline
&&& && \mathbf{1019B}&1&[5^{2}]&- \\
\mathbf{2039F}&99&3^{4} \!\cdot\! 5^{2}&=&\mbox{\tiny $13741381043009$}&\text{NONE} & & & \\
\mathbf{2041C}&43&3^{4}&=&\mbox{\tiny $61889617$}&\text{NONE} & & & \\
\mathbf{2045I}&39&3^{4}&=&3^{3}\!\cdot\!\mbox{\tiny $3123399893$}&\mathbf{2045C}&1&[18^{2}]&- \\
\hline
&&& && \mathbf{409A}&13&[9370199679^{2}]&- \\
\mathbf{2049D}&31&3^{2}&=&\mbox{\tiny $29174705448000469937$}&\text{NONE} & & & \\
\mathbf{2051D}&45&7^{2}&=&7\!\cdot\!\mbox{\tiny $674652424406369$}&\mathbf{2051A}&1&[56^{2}]&- \\
\mathbf{2059E}&45&5 \!\cdot\! 7^{2}&5^{2} \!\cdot\! 7^{2}&5^{2} \!\cdot\! 7\!\cdot\!\mbox{\tiny $167359757$}&\mathbf{2059A}&1&[70^{2}]&- \\
\hline
\mathbf{2063C}&106&13^{2}&=&\mbox{\tiny $8479$}&\text{NONE} & & & \\
\mathbf{2071F}&48&13^{2}&=&\mbox{\tiny $36348745$}&\text{NONE} & & & \\
\mathbf{2099B}&106&3^{2}&=&\mbox{\tiny $1$}&\text{NONE} & & & \\
\mathbf{2101F}&46&5^{2}&=&5\!\cdot\!\mbox{\tiny $11521429$}&\mathbf{191A}&2&[155^{2}]&- \\
\hline
\mathbf{2103E}&37&3^{2} \!\cdot\! 11^{2}&=&3^{2} \!\cdot\! 11\!\cdot\!\mbox{\tiny $874412923071571792611$}&\mathbf{2103B}&1&[33^{2}]&11^{2} \\
\mathbf{2111B}&112&211^{2}&=&\mbox{\tiny $1$}&\text{NONE} & & & \\
\mathbf{2113B}&91&7^{2}&=&\mbox{\tiny $1$}&\text{NONE} & & & \\
\mathbf{2117E}*&45&19^{2}&=&19\!\cdot\!\mbox{\tiny $1078389$}&\mathbf{2117A}&1&[38^{2}]&19^{2} \\
\hline
\end{array}$
\end{center}
\end{table}


\begin{table}
\caption{Visibility of Nontrivial Odd Parts of Shafarevich-Tate Groups\label{t4}
}
\begin{center}
$\begin{array}{|l@{}ccc@{}c|l@{}c@{}|cc|}\hline
\quad A& \dim& S_l & S_u & \mdeg
    & \quad B  & \dim\, & \,\,\ab & \Vis\\ \hline

\mathbf{2119C}&48&7^{2}&=&\mbox{\tiny $89746579$}&\text{NONE} & & & \\
\mathbf{2127D}&34&3^{2}&=&3\!\cdot\!\mbox{\tiny $18740561792121901$}&\mathbf{709A}&1&[3^{2}]&- \\
\mathbf{2129B}&102&3^{2}&=&\mbox{\tiny $1$}&\text{NONE} & & & \\
\mathbf{2130Y}&4&7^{2}&=&7\!\cdot\!\mbox{\tiny $83927$}&\mathbf{2130B}&1&[14^{2}]&- \\
\hline
\mathbf{2131B}&101&17^{2}&=&\mbox{\tiny $1$}&\text{NONE} & & & \\
\mathbf{2134J}&11&3^{2}&=&\mbox{\tiny $1710248025389$}&\text{NONE} & & & \\
\mathbf{2146J}&10&7^{2}&=&7\!\cdot\!\mbox{\tiny $1672443$}&\mathbf{2146A}&1&[7^{2}]&- \\
\mathbf{2159E}&57&13^{2}&=&\mbox{\tiny $31154538351$}&\text{NONE} & & & \\
\hline
\mathbf{2159D}&56&3^{4}&=&\mbox{\tiny $233801$}&\text{NONE} & & & \\
\mathbf{2161C}&98&23^{2}&=&\mbox{\tiny $1$}&\text{NONE} & & & \\
\mathbf{2162H}&14&3&3^{2}&3\!\cdot\!\mbox{\tiny $6578391763$}&\text{NONE} & & & \\
\mathbf{2171E}&54&13^{2}&=&\mbox{\tiny $271$}&\text{NONE} & & & \\
\hline
\mathbf{2173H}&44&199^{2}&=&199\!\cdot\!\mbox{\tiny $3581$}&\mathbf{2173D}&2&[398^{2}]&- \\
\mathbf{2173F}&43&19^{2}&3^{2} \!\cdot\! 19^{2}&3^{2} \!\cdot\! 19\!\cdot\!\mbox{\tiny $229341$}&\mathbf{2173A}&1&[38^{2}]&19^{2} \\
\mathbf{2174F}&31&5^{2}&=&5\!\cdot\!\mbox{\tiny $21555702093188316107$}&\text{NONE} & & & \\
\mathbf{2181E}&27&7^{2}&=&7\!\cdot\!\mbox{\tiny $7217996450474835$}&\mathbf{2181A}&1&[28^{2}]&- \\
\hline
\mathbf{2193K}&17&3^{2}&=&3\!\cdot\!\mbox{\tiny $15096035814223$}&\mathbf{129A}&1&[21^{2}]&- \\
\mathbf{2199C}&36&7^{2}&=&7^{2}\!\cdot\!\mbox{\tiny $13033437060276603$}&\text{NONE} & & & \\
\mathbf{2213C}&101&3^{4}&=&\mbox{\tiny $19$}&\text{NONE} & & & \\
\mathbf{2215F}&46&13^{2}&=&13\!\cdot\!\mbox{\tiny $1182141633$}&\mathbf{2215A}&1&[52^{2}]&- \\
\hline
\mathbf{2224R}&11&79^{2}&=&79&\mathbf{2224G}&2&[79^{2}]&- \\
\mathbf{2227E}&51&11^{2}&=&\mbox{\tiny $259$}&\text{NONE} & & & \\
\mathbf{2231D}&60&47^{2}&=&\mbox{\tiny $91109$}&\text{NONE} & & & \\
\mathbf{2239B}&110&11^{4}&=&\mbox{\tiny $1$}&\text{NONE} & & & \\
\hline
\mathbf{2251E}*&99&37^{2}&=&37&\mathbf{2251A}&1&[74^{2}]&37^{2} \\
\mathbf{2253C}*&27&13^{2}&=&13\!\cdot\!\mbox{\tiny $14987929400988647$}&\mathbf{2253A}&1&[26^{2}]&13^{2} \\
\mathbf{2255J}&23&7^{2}&=&\mbox{\tiny $15666366543129$}&\text{NONE} & & & \\
\mathbf{2257H}&46&3^{6} \!\cdot\! 29^{2}&=&3^{3} \!\cdot\! 29\!\cdot\!\mbox{\tiny $175$}&\mathbf{2257A}&1&[9^{2}]&- \\
\hline
&&& && \mathbf{2257D}&2&[2^{2}174^{2}]&- \\
\mathbf{2264J}&22&73^{2}&=&73&\mathbf{2264B}&2&[146^{2}]&- \\
\mathbf{2265U}&14&7^{2}&=&7^{2}\!\cdot\!\mbox{\tiny $73023816368925$}&\mathbf{2265B}&1&[7^{2}]&- \\
\mathbf{2271I}*&43&23^{2}&=&23\!\cdot\!\mbox{\tiny $392918345997771783$}&\mathbf{2271C}&1&[46^{2}]&23^{2} \\
\hline
\mathbf{2273C}&105&7^{2}&=&7^{2}&\text{NONE} & & & \\
\mathbf{2279D}&61&13^{2}&=&\mbox{\tiny $96991$}&\text{NONE} & & & \\
\mathbf{2279C}&58&5^{2}&=&\mbox{\tiny $1777847$}&\text{NONE} & & & \\
\mathbf{2285E}&45&151^{2}&=&151\!\cdot\!\mbox{\tiny $138908751161$}&\mathbf{2285A}&2&[2^{2}302^{2}]&- \\
\hline
\mathbf{2287B}&109&71^{2}&=&\mbox{\tiny $1$}&\text{NONE} & & & \\
\mathbf{2291C}&52&3^{2}&=&\mbox{\tiny $427943$}&\text{NONE} & & & \\
\mathbf{2293C}&96&479^{2}&=&479&\mathbf{2293A}&2&[2^{2}958^{2}]&- \\
\mathbf{2294F}&15&3^{2}&=&3\!\cdot\!\mbox{\tiny $6289390462793$}&\mathbf{1147A}&1&[3^{2}]&- \\
\hline
\mathbf{2311B}&110&5^{2}&=&\mbox{\tiny $1$}&\text{NONE} & & & \\
\mathbf{2315I}&51&3^{2}&=&3\!\cdot\!\mbox{\tiny $4475437589723$}&\mathbf{463A}&16&[13426312769169^{2}]&- \\
\mathbf{2333C}&101&83341^{2}&=&83341&\mathbf{2333A}&4&[2^{6}166682^{2}]&- \\
\hline
\end{array}$
\end{center}
\end{table}

\section{Kolyvagin's Euler system of Heegner points}
In this section we will briefly sketch some of the key ideas behind
Kolyvagin's proof of Theorem~\ref{thm:kolylog}.  We will follow
\cite{rubin:kolyvagin} very closely.  Two other excellent references
are \cite{gross:kolyvagin} and \cite{mccallum:kolyvagin}.  Kolyvagin's
original papers\edit{Add references.} on this theorem are not so easy
to read because they are all translations from Russian, but none of
the three papers cited above give a complete proof of his theorem.

We only sketch a proof of the following special case of Kolyvagin's
theorem.
\begin{theorem}\label{thm:kolyweak}
  Suppose $E$ is an elliptic curve over~$\Q$ such that $L(E,1)\neq 0$.
  Then $E(\Q)$ is finite and $\Sha(E)[p]=0$ for almost all primes~$p$.
\end{theorem}
The strategy of the proof is as follows.  Applying Galois cohomology
to the multiplication by~$p$ sequence
$$
0 \to E[p] \to E \xra{p} E \to 0,
$$
we obtain a short exact sequence
$$
  0 \to E(\Q)/ p E(\Q) \to \H^1(\Q,E[p]) \to \H^1(\Q,E)[p]\to 0.
$$
The inverse image of $\Sha(E)[p]$ in $\H^1(\Q,E[p])$ is called
the {\em Selmer group of~$E$ at~$p$}, and we will denote it
by $\Sel^{(p)}(E)$.  We have an exact sequence
$$
0 \to E(\Q)/ p E(\Q) \to \Sel^{(p)}(E) \to \Sha(E)[p] \to 0.
$$ 
Because $E(\Q)$ is finitely generated, to prove
Theorem~\ref{thm:kolyweak} it suffices to prove that $\Sel^{(p)}(E)=0$
for all but finitely many primes~$p$.  We do this by using complex
multiplication elliptic curves to construct Galois cohomology classes
with precise local behavior.

It is usually easier to say something about the Galois cohomology of
a module over a local field than over $\Q$, so we introduce some more
notation to help formalize this.  For any prime~$p$ and place~$v$ we
have a commutative diagram
$$
\xymatrix{
 0 \ar[r] & {E(\Q)/p E(\Q)} \ar[r]\ar[d] & {\H^1(\Q,E[p])}\ar[r]\ar[d]^{\res_v} & {\H^1(\Q,E)[p]}\ar[r]\ar[d]^{\res_v}& 0\\
  0 \ar[r] & {E(\Q_v)/p E(\Q_v)} \ar[r] & {\H^1(\Q_v,E[p])}\ar[r] & {\H^1(\Q_v,E)[p]}\ar[r]& 0
}
$$
Observe that 
$$
  \Sel^{(p)}(E) = \bigcap_v \res_v^{-1}(\text{ image } E(\Q_v)).
$$
For $s\in \Sel^{(p)}(E)$, let $s_v$ denote the inverse image
of $\res_v(s)$ in $E(\Q_v)/p E(\Q_v)$.

Our first proposition asserts that if we can construct a cohomology
class with certain properties, then that cohomology class forces
$\Sel^{(p)}(E)$ to be locally trivial. 
\begin{proposition}\label{prop:sel0}
  Suppose $\ell$ is a prime such that $E(\Q_\ell)[p] \isom \Z/p\Z$ and
  suppose there is a cohomology class $c_\ell\in\H^1(\Q,E)[p]$ such
that $\res_v(c_\ell) \neq 0$ if and only if $v=\ell$.
Then $\res_\ell(\Sel^{(p)}(E))=0\subset \H^1(\Q_\ell,E[p])$.
\end{proposition}
\begin{proof}[Sketch of proof]
  Suppose $s \in \Sel^{(p)}(E)$.  Using the local Tate pairing we
  obtain, for each~$v$, a nondegenerate pairing
$$
 \langle \, , \, \rangle_v : E(\Q_v)/ p E(\Q_v) \times \H^1(\Q_v,E)[p] \to \Z/p\Z.
 $$
 Unwinding the definitions, and using the fact that the sum of the
 local invariants of an element of $\Br(\Q)$ is trivial, we see that
 our hypothesis that all but one restriction of $c_\ell$ is trivial
 implies that $\langle s_\ell, \res_\ell(c_\ell)\rangle = 0$.  Since
 $\res_\ell(c_\ell)\neq 0$, this implies that $s_\ell=0$.
\end{proof}

Let $\tau\in\Gal(\Qbar/\Q)$ denote a fixed choice of complex
conjugation, which is defined by fixing an embedding of $\Qbar$
into~$\C$.  For any module~$M$ on which $\tau$ acts, let 
$$M^+ = \{x \in M : \tau(x)=x \} \qquad\text{and}\qquad
M^- = \{x \in M : \tau(x)= -x \}.$$
If $E$ is defined by $y^2=x^3+ax+b$ and $K=\Q(\sqrt{d})$, then
the twist of~$E$ by~$K$ is the elliptic curve
$dy^2 = x^3 + ax + b$.

\begin{theorem}
  There exists infinitely many quadratic imaginary fields~$K$ in which
  all primes dividing the conductor~$N$ of $E$ split, and such that
  $L'(E^K,1)\neq 0$, where $E^K$ is the twist of~$E$ over~$K$.
\end{theorem}
Fix a~$K$ as in the theorem such that $\O_K^* = \{\pm 1\}$, i.e., so
that the discriminant~$D$ of~$K$ is not $-3$ or $-4$.

\begin{lemma}\label{lem:kollem}
  Suppose $\ell\nmid p DN$ and $\Frob_{\ell}(K(E[p])/\Q)=[\tau]$.
  Then~$\ell$ is inert in~$K$, we have $a_\ell \con \ell + 1\con
  0\pmod {p},$ and the four groups $E(\Q_\ell)[p]$, $E(\F_\ell)[p]$,
  $E(K_\ell)[p]^{-}$, and $E(\F_{\ell^2})[p]^-$ are all cyclic of
  order~$p$.
\end{lemma}
\begin{proof}
The first assertion is true because $\tau|_K$ has order~$2$.
The characteristic polynomial of $\Frob_{\ell}(K(E[p])/\Q)$ on $E[p]$
is $x^2 - a_\ell x + \ell$, and the characteristic polynomial of
$\tau$ on $E[p]$ is $x^2 - 1$, which proves the second assertion.
For the third, we have
$$
 (\Z/p\Z)^2\isom E(\Qbar)[p] \isom E(K_\ell)[p] \isom E(\Q_\ell)[p] \oplus E(K_\ell)[p]^-,
$$
and each summand on the right must be nonzero since $\tau\neq 1$ on $E[p]$.
\end{proof}

For the rest of the argument, we assume that~$p$ is odd and does not
divide the order of the class group of~$K$.  We will now use the
theory of complex multiplication elliptic curves and class field
theory to construct cohomology classes $c_\ell$ which we will use in
Proposition~\ref{prop:sel0}.

Since every prime dividing the conductor~$N$ of~$E$ splits in~$K$,
there is an ideal $\cN$ of $K$ such that $\O_K/\cN\isom \Z/N\Z$.  Fix
such an ideal for the rest of the argument.  
Let
$$
\cN^{-1} = \{x \in K : x\cN \subset \O_K\}
$$
be the inverse of~$\cN$ in the group of fractional ideals
of~$\O_K$.
The pair
$$
(\C/\O_K, \quad\cN^{-1}/\O_K)
$$
then defines a point on $x \in X_0(N)$.  By complex multiplication
theory, the point $x$ is defined over the Hilbert Class Field $H$
of~$K$, which is the maximal unramified abelian extension of~$K$.  
Also, class field theory implies that $\Gal(H/K)$
is isomorphic to the ideal class group of~$K$.

Let
$\pi :X_0(N)\to E$ be a (minimal) modular parametrization.  Then 
$y_K = \Tr_{H/K}\pi(x_H) \in E(K)$, and we call 
$$
y = y_K - \tau(y_K) \in E(K)^-
$$ the {\em Heegner point} associated to~$K$.  Our hypotheses on~$K$
imply, by the theorem of Gross and Zagier, that~$y$ has infinite
order, a fact which will be crucial in our construction of cohomology
classes $c_\ell$.  If we were to choose a~$K$ such that $y$ were
torsion (of order coprime to~$p$), then our classes $c_\ell$ would be
locally trivial, hence give candidate elements of $\Sha(E)$ (see
\cite[\S11, pg.~254]{gross:kolyvagin} and \cite{mccallum:kolyvagin}
for more on this connection).

Suppose $\ell\nmid N$ is inert in~$K$ (i.e., does not split).  Let
$$
\O_\ell = \Z + \ell \O_K,
$$
which is the {\em order of conductor~$\ell$} in $\O_K$.
Notice that $\O_K/\O_\ell\isom \Z/\ell\Z$ as {\em groups}.
Since $K\subset \C$, it make sense to view $\O_\ell$ as a lattice in~$\C$. 
The pair
$$
(\C/\O_\ell, \quad (\cN\cap \O_\ell)^{-1}/\O_\ell)
$$
then defines a CM point $x_\ell \in X_0(N)$.  This point won't be defined over
the Hilbert class field~$H$, though, but instead over an abelian
extension $K[\ell]$ of $K$ that is a cyclic extension of~$H$ of degree
$\ell+1$ totally ramified over~$H$ at~$\ell$ and unramified
everywhere else.  Let 
$$
y_\ell = \pi(x_\ell) \in E(K[\ell]).
$$

\begin{proposition}\label{prop:kolltr}
We have $\Tr_{K[\ell]/H}(y_\ell) = a_\ell y_H$, where $y_H = \pi(x_H)$.
Also, for any prime $\lambda$ of $K[\ell]$ lying above~$\ell$, we have
$$
   \tilde{y}_\ell = \Frob_{\ell}(\tilde{y}_H),
$$
as elements of $E(\F_{\ell^2})$.
\end{proposition}
We will not prove this proposition, except to note that it follows
from the explicit descriptions of the action of $\Gal(\Qbar/\Q)$ on CM
points on $X_0(N)$ and of the Hecke correspondences.

We are almost ready to construct the cohomology classes $c_\ell$.
Suppose $\ell\nmid pDN$ is any prime such that
$\Frob_{\ell}(K(E[p])/\Q)=[\tau]$.  By Lemma~\ref{lem:kollem}, 
$[K[\ell]:H]=\ell+1$ is divisible by~$p$,
so there is a unique extension $H'$ of $H$ of degree~$p$ contained
in $K[\ell]$.  Let $\vphi$ be a lift of $\Frob_\ell(H/\Q)$ to $\Gal(H'/\Q)$,
and let
$$
  z' = \Tr_{K[\ell]/H'}(y_\ell - \vphi(y_\ell))
        - \frac{a_\ell}{p} (y_H - \vphi(y_H)) \in E(H').
$$

\begin{lemma}\label{lem:trzero}
$\Tr_{H'/H}(z') = 0$.
\end{lemma}
\begin{proof}
Using properties of the trace and Proposition~\ref{prop:kolltr}, 
we have
\begin{align*}
\Tr_{H'/H}(z') &= \Tr_{K[\ell]/H}(y_\ell) - \Tr_{K[\ell]/H}(\vphi(y_\ell))
      - a_\ell(y_H) - a_\ell\vphi(y_H)\\
   &= a_\ell y_H - a_\ell\vphi(y_H) 
    - a_\ell(y_H) - a_\ell\vphi(y_H) \\
   &= 0.
\end{align*}
\end{proof}

For the rest of the proof we only consider primes~$p$ such that
$$
\H^1(\Q_v^{\unr}/\Q_v,E(\Q_v^{\unr}))[p] = 0
$$
for all~$v$, where $\Q_v^{\unr}$ is the maximal unramified
extension of~$\Q_v$. (This only excludes finitely many primes, by
[Milne, Arithmetic Duality Theorems, Prop. I.3.8].)
\begin{proposition}\label{prop:cl}
There is an element $c_\ell\in\H^1(\Q,E)[p]$ such that
$\res_v(c_\ell)=0$ for all $v\neq \ell$, and
$\res_\ell(c_\ell)\neq 0$ if and only if 
$y\not\in p E(K_\ell)$.
\end{proposition}
\begin{proof}
Recall that we assumed that $p\nmid [H:K]$.  Thus there is a unique extension
$K'$ of $K$ of degree $p$ in $K[\ell]$, which is totally ramified at~$\ell$
and unramified everywhere else, such that $H'=HK'$.
Let
$$
  z = \Tr_{H'/K'}(z') \in E(K').
$$
By Lemma~\ref{lem:trzero}, $\Tr_{K'/K}(z) = 0$.  

The extension $\Gal(K'/K)$ is cyclic (since it has degree~$p$), so it
is generated by a single element, say $\sigma$.  The cohomology of
a cyclic group is easy to understand (see Atiyah-Wall\edit{expand}).
In particular, we have a canonical isomorphism
$$
  \H^1(K'/K, E(K')) \isom \frac{\ker(\Tr_{K'/K}: E(K') \to E(K))}{(\sigma-1)E(K')}.
$$
Define $c_\ell'$ to be the element of $\H^1(K'/K,E(K'))$ 
that corresponds to~$z$ under this isomorphism.
A more careful analysis shows that $c_\ell'$ is the restriction of an element
$c_\ell$ in $\H^1(\Q,E)[p]$.

If $v\neq \ell$ then 
$$ 
\res_v(c_\ell) \in \H^1(\Q_v^{\unr}/\Q_v,E(\Q_v^{\unr}))[p] = 0,
$$
as asserted.  The assertion about $\res_\ell(c_\ell)$ is obtained
with some work by reducing modulo~$\ell$ and applying
Lemma~\ref{lem:kollem} and Proposition~\ref{prop:kolltr}.
\end{proof}

\begin{remark}
McCallum has observed that $c_\ell$ is represented by the
$1$-cocycle
$$
  \sigma\mapsto - \frac{(\sigma-1)y_\ell}{\ell},
$$
where $((\sigma-1)y_\ell)/\ell$ is the unique point $P\in E(K[\ell])$
such that $\ell P = (\sigma-1)y_\ell$.  (The point~$P$ is unique
because no nontrivial $p$-torsion on~$E$ is defined over
$E(K[\ell])$.)
\end{remark}

\begin{corollary}\label{cor:alsokillsel}
If $y\not\in p E(K_\ell)$, then $\res_\ell(\Sel^{(p)}(E))=0$.
\end{corollary}
\begin{proof}
Combine Propositions~\ref{prop:sel0} and~\ref{prop:cl}.
\end{proof}

\renewcommand{\th}{\hat{t}}
If $t\in \H^1(K,E[p])$, denote by $\th$ the image
of~$t$ under restriction:
\begin{equation}\label{eqn:kolyres}
\H^1(K,E[p]) \to \Hom(\Gal(\Qbar/K(E[p])), E[p]).
\end{equation}
It is useful to consider $\th$, since homomorphisms satisfy a
local-to-global principle.  A homomorphism $\vphi:\Gal(\Qbar/F)\to M$
is $0$ if and only if it is $0$ when restricted to
$\Gal(\overline{F}_\lambda/F_\lambda)$ for all primes~$\lambda$ of~$F$
(this fact follows from the Chebotarev density theorem).

For the rest of the proof we now assume that~$p$ is large enough that
there are no $\Q$-rational cyclic subgrups of~$E$ of order~$p$, and
$\H^1(K(E[p])/K,E[p])=0$.  (That we can do this follows from a theorem
of Serre when $E$ does not have CM, or CM theory when $E$ does have
CM.)
\begin{lemma}\label{lem:killt}
Suppose $t \in \H^1(K,E[p])^{\pm}$ and the image of $\th$ is cyclic.
Then $t=0$.
\end{lemma}
\begin{proof}
Since $\tau$ acts on $\th$ by $\pm$, the image of $\th$ is rational over~$\Q$.
Thus the image of $\tau$ is trivial.  The kernel of the restriction map
(\ref{eqn:kolyres}) is also trivial by assumption, so $t=0$.
\end{proof}

We are now ready to prove Theorem~\ref{thm:kolyweak}.  Choose~$p$
large enough so that $y\not \in p E(K)$, in addition to all other
``sufficiently large'' constraints that we put on~$p$ above.

\newcommand{\sh}{\hat{s}} 
\newcommand{\yh}{\hat{y}} 

Fix $s\in \Sel^{(p)}(E)$ and write $\sh$ for the restriction of~$s$ to
a homomorphism $\Gal(\Qbar/K(E[p]))\to{}E[p]$.  Our goal is to prove that
$s=0$.  Write $\yh$ for the restriction to $\Gal(\Qbar/K(E[p]))$
of the image of~$y$ under the injection
\begin{equation}\label{eqn:heegner_minus}
E(K)^-/p E(K)^- \to \H^1(K,E[p])^-.
\end{equation}
Fix a finite extension~$F$ of $K(E[p])$ that is Galois over~$\Q$,
so that both homomorphism $\sh$ and $\yh$ factor through
$G=\Gal(F/K(E[p]))$.

Suppose $\gamma\in G$, and use the Chebotarev Density Theorem to find
a prime $\ell\nmid pDN$ such that $\Frob_\ell(F/\Q)=[\gamma\tau]$.
Then $$\Frob_{\ell}(K(E[p])/\Q)=[\tau],$$ and 
$$
\Frob_\ell(F/K(E[p])) = [\gamma\tau]^{\text{order}(\tau)} = [(\gamma\tau)^2].
$$ 
By Lemma~\ref{lem:killt}, $s_\ell=0$ implies that $\sh((\gamma\tau)^2)=0$
for all $\gamma\in G$.  Likewise, $y\in p E(K_\ell)$ implies that
$\yh((\gamma\tau)^2)=0$ for all $\gamma\in G$.
Since $s\in\H^1(\Q,E)$ we have $\tau(\sh) = \sh$ and
by (\ref{eqn:heegner_minus}) we have $\tau(\yh)=-\yh$, so 
\begin{align}\label{eqn:heeg1}
   \sh((\gamma\tau)^2) &= \sh(\gamma) + \sh(\tau\gamma\tau) = (1+\tau)\sh(\gamma)\\\label{eqn:heeg2}
   \yh((\gamma\tau)^2) &= \yh(\gamma) + \yh(\tau\gamma\tau) = (1-\tau)\yh(\gamma).
\end{align}
By Corollary~\ref{cor:alsokillsel}, for every $\gamma\in G$, one of
$\sh((\gamma\tau)^2)$ or $\yh((\gamma\tau)^2)$ is~$0$, so by
(\ref{eqn:heeg1}) and (\ref{eqn:heeg2}) at least one of the following holds:
$$
\sh(\gamma) \in E[p]^-
$$
or 
$$
\yh(\gamma) \in E[p]^+.
$$
Thus
$$
  G = \sh^{-1}(E[p]^-) \bigcup \yh^{-1}(E[p]^+).
$$
Since a group cannot be the union of two proper subgroups, either
$\sh(G) \subset E[p]^-$ or $\yh(G)\subset E[p]^+$. 
By Lemma~\ref{lem:killt}, either $s=0$ or $y\in p E(K)$.  But we
assumed that $y \not \in p E(K)$, so $s=0$, as claimed.

\subsection{A Heegner point when $N=11$}
Let~$E$ be the elliptic curve $X_0(11)$, which has conductor~$11$
and Weierstrass equation $y^2 + y = x^3 - x^2 - 10x - 20$. 
The following uses a nonstandard MAGMA package...

\begin{verbatim}
> E := EllipticCurve(CremonaDatabase(),"11A");
> E;
Elliptic Curve defined by y^2 + y = x^3 - x^2 - 10*x - 20 over Rational Field
> 
[]
> A := [-D : D in [1..20] | HeegnerHypothesis(E,-D)]; A; 
[ -7, -8, -19 ]
> P := [* *]; for D in A do time p,q := HeegnerPoint(E,D); Append(~P,<p,q>); end for;
> P;   // pairs the (heegner point, its trace to Q)
[* <(0.500000000000000000023668707008012648357 + 1.322875655532295292727422603610*i : 
    -2.0000000000000000043473199962953622702 + 5.291502622129181186268103643387*i : 1), 
    (11 : -61 : 1)>, 
<(-2.99999999999999999717372417577 + 1.414213562373095051128215430668*i : 
    2.99999999999999999372415320819 + 4.242640687119285158529184817212*i : 1), 
     (-3/4 : 121/8 : 1)>, 
<(-6.99999999999999999753082167926 + 8.71779788708134709829181547345*i : 
   37.000000000000000044867139452136100922 + 8.71779788708134710182445372185*i : 1), 
   (1161/16 : -33549/64 : 1)> *]
> P[1];
<(0.500000000000000000023668707008012648357 + 1.322875655532295292727422603610*i : 
   -2.0000000000000000043473199962953622702 + 5.291502622129181186268103643387*i : 1), 
  (11 : -61 : 1)>
> Sqrt(-7)/2;
2.64575131106459059050161575359*i
> Sqrt(-7)/2;
1.322875655532295295250807876795*i
> 2*Sqrt(-7);
5.291502622129181181003231507183*i
> // Thus  ((1+sqrt(-7))/2 , -2+2*sqrt(-7)) is the Heegner point 
> // corresponding to Q(sqrt(-7)).
\end{verbatim}

\subsection{Kolyvagin's Euler system for curves of rank at least $2$}

\edit{Summary of my work to show nontriviality in some cases.  Make
sure to also mention work of Rubin, Mazur, Howard, Weinstein, etc., in this
section.  One interesting idea might be to add my whole {\em book} on BSD
into this book...}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "main"
%%% End: 
\chapter{The Gorenstein Property for Hecke Algebras}

\index{Gorenstein}
\section{Mod $\ell$ representations associated to modular forms}
Suppose $f=\sum a_n q^n$ is a newform of exact level~$N$
and weight~$2$ for the congruence subgroup $\Gamma_0(N)$.  
Let $E=\Q(\ldots,a_n,\ldots)$ and let $\lambda$ be a place
of~$E$ lying over the prime~$\ell$ of~$\Q$. The action 
of~$\GalQ$ on the $\ell$-adic Tate module of the associated
abelian variety~$A_f$ gives rise to a representation
$$\rho_{\lambda}:\GalQ\into\GL_2(E_{\lambda})$$
that satisfies $\det(\rho_{\lambda})=\chi_{\ell}$ and
$\tr(\rho_{\lambda}(\Frobp))=a_p$ for $p\nd\ell N$. 
Using the following lemma, it is possible to reduce 
$\rho_{\lambda}$ module~$\lambda$.
\begin{lemma}\label{lem:ovalues}
Let $\cO$ be the ring of integers of $E_{\lambda}$. Then
$\rho_{\lambda}$ is equivalent to a representation that
takes values in $\GL_2(\cO)$. 
\end{lemma}
\begin{proof}
View $\GL_2(E_{\lambda})$ as the group of automorphisms
of a $2$-dimensional $E_{\lambda}$-vector space~$V$.
A \define{lattice} $L\subset V$
is a free $\cO$-module of rank~$2$ such that
$L\tensor E_{\lambda}\isom V$. 
It suffices to find an $\cO$-lattice~$L$ in~$V$ that
is invariant under the action via $\rho_{\lambda}$
of~$\GalQ$. For then the matrices of~$\GalQ$ with respect
to a basis of~$V$ consisting of vectors from~$L$ 
will have coefficients in~$\cO$.
Choose any lattice $L_0\subset V$. Since~$L_0$ is 
discrete and $\GalQ$ is compact,
the set of  lattices $\rho_{\lambda}(g)L_0$ with $g\in\GalQ$ is
finite. 
Let $L=\sum \rho_{\lambda}(g)L_0$ be the sum of 
the finitely many conjugates of $L_0$; then~$L$ is Galois invariant. 
The sum is a lattice because it is finitely generated and torsion free,
and~$\cO$ is a principal ideal domain.
\end{proof}

Choose an~$\O$ as in the lemma, and tentatively
write $\rholambdabar=\rholam \mod \lambda$:
$$\xymatrix{
{\GalQ}\ar[dr]_{\text{false }\rholambdabar}\ar[r]^{\rholam}&{\GL_2(\cO)}\ar[d]\\
               &\GL_2(\cO/\lambda)}$$
The drawback to this definition is 
that~$\rholambdabar$ is not intrinsic;
the definition depends on making a choice of~$\cO$.
Instead we define~$\rholambdabar$ to be
the semisimplification of the reduction of~$\rholam$ 
modulo~$\lambda$. The semisimplification of a representation is 
the direct sum of the Jordan-H\"older factors in a filtration 
of a vector space affording the representation.
We have $\det(\rholambdabar)\con \chi_{\ell}\pmod{\ell}$,
where~$\chi_\ell$ is the mod~$\ell$ cyclotomic character,
and $\tr(\rholambdabar(\Frobp)) =a_p\mod\lambda$.
Thus the characteristic polynomials in the 
semisimplification~$\rholambdabar$ 
are independent of our choice of reduction of $\rholam$.
The following theorem implies
that~$\rholambdabar$ depends only on~$f$ and~$\lambda$,
and not on the choice of the reduction.
\begin{theorem}[Brauer-Nesbitt] \index{Brauer-Nesbit theorem} Suppose
$\rho_1,\rho_2:G\into\GL(V)$ are two finite dimensional
semisimple representations of a group $G$ over a finite 
field $k$. Assume furthermore that
for every $g\in G$ the characteristic polynomial
of $\rho_1(g)$ is the same as the characteristic polynomial
of $\rho_2(g)$. Then $\rho_1$ and $\rho_2$ are equivalent.
\end{theorem} 
\begin{proof}
For a proof, see~\cite[\S30, p.~215]{curtis-reiner}.
\end{proof}



The Hecke operators~$T_n$ act as endomorphisms of
$S_2(\Gamma_0(N))$. Let 
   $$\T:=\Z[\ldots,T_n,\ldots]\subset \End(S_2(\Gamma_0(N))),$$ 
and recall that~$\T$ is a commutative ring; as 
a $\Z$-module~$\T$ has rank equal to
$\dim_{\C}S_2(\Gamma_0(N))$. Let~$\m$ be a maximal
ideal of~$\T$ and set $k:=\T/\m\ncisom \F_{\ell^{\nu}}$.
\begin{proposition}\label{prop:associatedrep}
There is a unique semisimple representation 
$$\rho_\m:\GalQ\into\GL_2(k)$$
such that
$\rho_\m$ is unramified outside $\ell N$
and 
\begin{eqnarray*}
\tr(\rho_\m(\Frobp))&=&T_p \mod \m\\
\det(\rho_\m(\Frobp))&=&p \mod \m.
\end{eqnarray*} 
\end{proposition}
\begin{proof}
It is enough to prove the assertion with~$\T$ replaced 
by the subalgebra
$$\T_0=\Z[\{\ldots,T_n,\ldots:(n,N)=1\}].$$
Indeed, the maximal ideal~$\m$ of~$\T$ pulls back to a 
maximal ideal $\m_0$ of $\T_0$, 
and $k_0=\T_0/\m_0\subset k$.
Now 
$$\T_0\subset\T_0\tensor\Q=\prod_{i=1}^t E_i$$
with the $E_i$ number fields. Let $\cO_{E_i}$ be the 
ring of integers of $E_i$ and let $\cO=\prod\cO_{E_i}$. 
%Then we have
%$$\m_0\subset\T_0\subset\prod\cO_{E_i}.$$
By the going up theorem there is a maximal ideal
$\lambda\subset\prod\cO_{E_i}$ lying over~$\m_0$:
$$\xymatrix{
   *++{\lambda} \ar@{^(->}[r]\ar@{-}[d] & {\prod\cO_{E_i}}\ar[r]\ar@{-}[d] 
        & {\cO/\lambda}\ar@{-}[d] \\
   *++{\m_0}\ar@{^(->}[r]     & {\T_0} \ar[r]& k_0
}$$
Using the above
construction, we make a representation
$$\rholambdabar:\GalQ\into\GL_2(\cO/\lambda)$$
that satisfies $\det(\rholambdabar)\con \chi_{\ell}\pmod{\lambda}$ and 
$\tr(\rholambdabar)=T_p \pmod{\lambda}$.
Because of how we have set things up, $T_p$ plays the role of~$a_p$.
Thus this representation
has the required properties, but it takes values in $\GL_2(\cO/\lambda)$
instead of $k_0$. 

Since the characteristic polynomial
of every $\rholambdabar(g)$ for $g\in\GalQ$ has coefficients
in the subfield $k_0\subset\cO/\lambda$ there is a
model for $\rholam$ over $k_0$. 
This is a classical result of I.~Schur.
Brauer groups of finite fields are trivial 
(see e.g., \cite[X.7, Ex.~a]{serre:localfields}),
so the argument of~\cite[\S12.2]{serre:linear} 
completes the proof of the proposition.

Alternatively, when the residue characteristic~$\ell$ of~$k_0$ 
is odd, the following more direct proof can be used.
Complex conjugation acts through~$\rholambdabar$ as a matrix with 
distinct $\Fl$-rational eigenvalues;
another well known theorem of Schur~\cite[IX~a]{schur:arith}
(cf.~\cite[Lemme~I.1]{waldspurger:comp1}) 
then implies that~$\rholambdabar$ can be conjugated into
a representation with values in $\GL(2,k_0)$.
\end{proof}

Let us look at this construction in another way. Write
$$\T_0\tensor\Q=E_1\cross\cdots\cross E_t$$ 
and recall that each number field~$E_i$
corresponds to a newform of level 
$M\mid N$; one can obtain~$E_i$
by adjoining the coefficients of 
some newform of level $M\mid N$ to~$\Q$.
Likewise, the Jacobian
$\jon$ is isogenous to a product $A_1\cross\cdots\cross A_t$. 
Consider
one of the factors, say $E_1$, and to fix ideas suppose
that it corresponds to a newform of exact level~$N$. Since
$\Tate_{\ell}A_1$ is free of rank~$2$ over 
$E_1\tensor_{\Q}\Ql$, we obtain a $2$-dimensional 
representation~$\rholam$. Reducing mod~$\lambda$ and semisimplifying gives
the representation constructed in the above proposition.
But it is also possible that one of the fields~$E_i$ 
corresponds to a newform~$f$ of level~$M$ properly dividing~$N$. 
%Then the associated abelian variety~$A_i$ has too large dimension.
% Huh?
In this case, we repeat the whole construction with $J_0(M)$
to get a $2$-dimensional representation. 

Consider one of the abelian varieties $A_1$ as above,
which we view as an abelian  subvariety of $\jon$.
Then~$\T$ acts on~$A_1$; let $\overline{\T}$
denote the image of~$\T$ in $\End A_1$. 
Although $\overline{\T}$ sits naturally in 
$\cO_1$, which is the ring of integers of a field, 
$\overline{\T}$ might not be integrally closed. Consider
the usual $\Z_{\ell}$-adic Tate module 
$\Tate_{\ell}(A_1)\ncisom\Z_{\ell}^{2\dim A_1}$, where
$\dim A_1=[E_1:\Q]$.
In the 1940s Weil proved that 
$\overline{\T}\tensor \Z_{\ell}$
acts  faithfully on the Tate module.
By the theory of semilocal rings 
(see, e.g.,~\cite[Cor.~7.6]{eisenbud}), we have 
$$\overline{\T}\tensor\Z_{\ell}
 =\prod_{\m \mid \ell}\overline{\T}_{\m},$$
where the product is over all maximal ideals of~$\overline{\T}$ of
residue characteristic~$\ell$.
The idempotents $e_\m$, in this decomposition, decompose $\Tate_\ell$
as a product $\prod_{\m}\Tate_{\m}(A_1)$. 
It would be nice if $\Tate_{\ell}$ were free of
rank $2$ over $\overline{\T}\tensor\Z_{\ell}$ but
this is not known to be true in general, although
it has been verified in many special cases. For this to be
true we must have that, for all $\m\mid \ell$, that
$\Tate_{\m}(A_1)$ is free of rank $2$ over $\overline{\T}_\m$. 

%% -----------\/   what is things?
Next we put things in a finite context instead of a projective
limit context. 
Let $J=\jon$, then by Albanese\index{Albanese} or Picard functoriality
$\T\subset\End J$. Let $\m\subset\T$ be a maximal ideal. 
Let 
$$J[\m]=\{t\in J(\overline{\Q}):xt=0 \text{ for all }x\in\m\}.$$
Note that $J[\m]\subset J[\ell]$ where $\ell$ is the rational
prime lying in $\m$. Now
$J[\ell]$ is an $\F_{\ell}$ vector space of rank $2g$ where
$g$ is the genus of $\xon$. Although it is true that 
$J[\ell]$ is a $\T/\ell$-module, it is not convenient
to work with $\T/\ell$ since it might not be a product
of fields because of unpleasant ramification. 
It is more convenient to work with $J[\m]$ since
$\T/\m$ is a field. Thus, via this optic\index{optic}, 
$J[\m]$ is a $k[G]$-module where $k=\T/\m$ and
$G=\GalQ$. The naive hope is that $J[\m]$ is a model
for $\rho_\m$, at least when $\rho_\m$ is irreducible. 
This does not quite work, but we do have the following theorem.
\begin{theorem}   
If $\ell\nmid 2N$   then $J[\m]$ is a model for $\rho_\m$.
\end{theorem}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
%% 3/8/96
\section{The Gorenstein property}
\index{Gorenstein}
Consider the Hecke algebra
$$\T:=\Z[\ldots,T_n,\ldots]\subset\End \jon,$$
and let $\m\subset\T$ be a maximal ideal of residue
characteristic~$\ell$.
We have constructed a semisimple representation 
$$\rhom:\GalQ\into\GL_2(\T/\m).$$
It is unramified outside $\ell N$, and for any prime $p\nd\ell N$
we have
\begin{eqnarray*}
\tr(\rho_\m(\Frobp))&=&T_p \mod \m\\
\det(\rho_\m(\Frobp))&=&p \mod \m.
\end{eqnarray*} 
We will usually be interested in the case when $\rhom$ is irreducible.
Let $\T_\m=\varprojlim \T/\m^i\T$ denote the completion of $\T$ at $\m$. 
Note that 
$\T\tensor_{\Z}\Z_{\ell}=\prod_{\m|\ell}\T_{\m}$. 
Our goal is to prove that if $\m\nd 2N$ and $\rhom$ is irreducible,
then $\T_\m$ is Gorenstein. 
\begin{defn} %% This is lifted from Wiles' Annals paper. 
Let $\cO$ be a complete discrete valuation ring. Let $T$
be a local $\cO$-algebra which as a module is finite and
free over~$\cO$. Then~$T$ is a \define{Gorenstein $\cO$-algebra}
if there is an isomorphism of $T$-modules
$T\iso\Hom_{\cO}(T,\cO)$.  
\end{defn}
Thus $\T_\m$ is Gorenstein if there is an isomorphism
$\Hom_{\Z_{\ell}}(\T_{\m},\Z_{\ell})\ncisom \T_{\m}$
of $\T_{\m}$-modules. Intuitively, this means  
that $\T_{\m}$ is ``autodual''.  

\begin{theorem}
Let $J=\jon$ and let $\m$ be a maximal ideal of the Hecke algebra.
Assume that $\rhom$ is irreducible and that $\m\nd 2N$. 
Then $\dim_{\T/\m}J[\m]=2$ and $J[\m]$, as a Galois module, is a 
$2$-dimensional representation giving rise to $\rho_{\m}$.
\end{theorem}
An easy argument shows that the theorem implies $\T_\m$ is Gorenstein. 

We first consider the structure of $W=J[\m]$. Suppose the two dimensional
representation
 $$\rhom:\GalQ\into\Aut_{\T/\m}V$$
constructed before is irreducible. 
Consider the semisimplification $W^{\ss}$ of $W$, thus $W^{\ss}$ is
the direct sum of its Jordan-H\"{o}lder factors as a $\GalQ$-module. 
Mazur\index{Mazur} proved the following theorem.
\begin{theorem}
There is some integer $t\geq 0$ so that
$$W^{\ss}\isom V\cross \cdots \cross V=V^t.$$
\end{theorem}

If $\rhom$ is in fact {\em absolutely irreducible} then 
it is a result of Boston, Lenstra, and Ribet \cite{boston-lenstra-ribet} 
that $W\isom V\cross\cdots\cross V$. A representation is absolutely
irreducible if it is irreducible over the algebraic closure. 
It can be shown that if $\ell\neq 2$ and 
$\rho_{\m}$ is irreducible then $\rhom$ must be
absolutely irreducible.  

The construction of $W$ is nice and gentle whereas the construction
of $V$ is accomplished via brute force.

\begin{proof} (Mazur)
We want to compare $V$ with $W$. Let $d=\dim W$. Let 
$$W^*=\Hom_{\T/\m}(W,\T/\m(1))$$
where $\T/\m(1)=\T/\m\tensor_{\Z}\Mul$. 
We need to show that
$$W^{\ss}\oplus W^{*\ss}\isom V\cross\cdots\cross V=V^{d}$$
as representations of $\GalQ$. 
Note that each side is a semisimple module of dimension $2d$. 
To obtain the isomorphism we show that the two representations
have the same characteristic polynomials so they are isomorphic.

We want to show that the characteristic polynomial of $\Frobp$
is the same for both $W^{\ss}\oplus W^{\*\ss}$ and $V\cross\cdots\cross V$. 
The characteristic polynomial of $\Frobp$ on $V$ is
$X^2-T_pX+p=(X-r)(X-pr^{-1})$ where $r$ lies in a suitable
algebraic closure. It follows that the characteristic
polynomial of $\Frobp$ on $V^d$ is $(x-r)^d(x-pr^{-1})^d$. 
On $W$ the characteristic polynomial of $\Frobp$ is
$(X-\alpha_1)\cdots(X-\alpha_d)$ where 
$\alpha_i$ is either $r$ or $pr^{-1}$. This is because Eichler-Shimura
\index{Eichler-Shimura}
implies $\Frobp$ must satisfy $\Frobp^2-T_p\Frobp+p=0$. 
[[I don't see this implication.]]
On $W^{*}$ the characteristic polynomial of $\Frobp$ is
$(X-p\alpha_1^{-1})\cdots(X-p\alpha_d^{-1})$. [[This is 
somehow tied up with the definition of $W^{*}$ and I can't
quite understand it.]] Thus on $W\oplus W^{*}$, the 
characteristic polynomial of $\Frobp$ is
$$\prod_{i=1}^{d}(X-\alpha_i)(X-p\alpha_i^{-1})=
             \prod_{i=1}^d(X-r)(X-pr^{-1})=(X-r)^d(X-pr^{-1})^d.$$  
Therefore the characteristic polynomial of $\Frobp$ on $W\oplus W^{*}$
is the same as the characteristic polynomial of $\Frobp$ on 
$V\cross\cdots\cross V$. 
The point is that although the $\alpha_i$ could all {\em a priori} be
$r$ or $pr^{-1}$, by adding in $W^*$ everything pairs off correctly. 
[[I don't understand why we only have to check that the two representations
agree on $\Frobp$. There are lots of other elements in $\GalQ$, right?]]
\end{proof}

We next show that $J[\m]\neq 0$. This does not follow from the
theorem proved above because it does not rule out the possibility
that $t=0$ and hence $W^{\ss}\isom 0$.  
Suppose $J[\m]=0$, then we will show that $J[\m^i]=0$ for all $i\geq 1$. 
We consider the $\ell$-divisible
group $J_{\m}=\union_i J[\m^i]$. To get a better feel for what is going 
on, temporarily forget about 
$\m$ and just consider the Tate module corresponding to $\ell$. 

It is standard to consider the Tate module
$$\Tatel J=\varprojlim J[\ell^i]\isom \Zl^{2\dim J}.$$
It is completely equivalent to consider 
$$J_{\ell}:=\union_{i=1}^{\infty} J[\ell^i]
          \iso(\Ql/\Zl)^{2\dim J}.$$ 
Note that since $\Ql/\Zl$ is not a ring the last isomorphism
must be viewed as an isomorphism of abelian groups. 
In \cite{mazur:eisenstein} 
Mazur\index{Mazur} called $\Tatel J\isom\Hom(\Ql/\Zl,J_{\ell})$
the covariant Tate module. Call 
$$\Tatel^* J:=\Hom(J_{\ell},\Ql/\Zl)\isom\Hom_{\Zl}(\Tatel J,\Zl)$$
the contravariant Tate module.
[[Why are the last two isomorphic?]] 
The covariant and contravariant Tate modules are related by
a Weil pairing $J[\ell^i]\cross J[\ell^i]\into\Mu_{\ell^i}$.
Taking projective limits we obtain a pairing
$$\langle\cdot,\cdot\rangle:\Tatel J\cross\Tatel J\into\Zl(1)=\varprojlim\Mu_{\ell^i}.$$
This gives a map
$$\Tatel J\into\Hom(\Tatel J,\Zl(1))=(\Tatel^* J)(1)$$
where $(\Tatel^* J)(1)=(\Tatel^*J)\tensor\Zl(1)$.
$\Zl(1)$ is a $\Zl$-module where 
$$\sum a_i \ell^i\cdot\zeta=\zeta^{\sum a_i\ell^i}$$
[[This should probably be said long ago.]]
This pairing is not a pairing of $\T$-modules, since 
if $t\in\T$ then $\langle tx,y\rangle=\langle x,t^{\dual}y\rangle.$
It is more convenient to use an adapted pairing defined as follows.
Let $w=w_V\in\End\jon$ be the Atkin-Lehner involution so that
$t^{\dual}=wtw$. Define a new $\T$-compatible pairing by
$[x,y]:=\langle x,wy\rangle.$ Then
$$[tx,y]=\langle tx,wy\rangle=\langle x,t^{\dual}wy\rangle
=\langle x,wty\rangle=[x,ty].$$

The pairing $[\cdot,\cdot]$ defines an isomorphism of 
$\T\tensor\Zl$-modules
$$\Tatel J\iso \Hom_{\Zl}(\Tatel J,\Zl(1)).$$ 
Since $\Zl(1)$ is a free module of rank $1$ over $\Zl$ 
a suitable choice of basis gives an isomorphism
of $\T\tensor\Zl$-modules
$$(\Tatel^* J)(1)\isom\Hom_{\Zl}(\Tatel J, \Zl(1))\isom
\Hom_{\Zl}(\Tatel J,\Zl)=\Tatel^* J.$$
%% I haven't checked this 100%!
Thus $\Tatel J\iso \Tatel^* J$.  

\begin{proof} (That $J[\m]\neq 0$.)
The point is that the contravariant Tate module
$\Hom(J_{\ell},\Ql/\Zl)$ is the Pontrjagin dual of $T_{\ell}$. 
How does this relate to $\Tate_{\m}J$? 
Since 
$\T\tensor\Zl\isom\prod_{\m|\ell}\T_\m$,
$\Tatel J\isom\prod_{\m|\ell}\Tate_{\m} J$ so we can define
$\Tate_\m^*J:=\Hom_{\Zl}(\Tate_\m J,\Zl)$.
Weil proved that $\Tate_\m J\isom Tate_\m^* J$ is nonzero. 
View $\Tate_\m^* J$ as being dual to $J_\m$ in the sense
of Pontrjagin duality and so 
$(\Tate_\m^*J)/(\m\Tate^*_\m J)$ is dual to $J[\m]$. 
If $J[\m]=0$ then this quotient is $0$, so Nakayama's lemma
would imply that $\Tate_\m^* J=0$. This would contradicts 
Weil's assertion. Therefore $J[\m]\neq 0$.  
\end{proof}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%55
%% 3/11/96

%%%%%%%%%%%%%%%%%%%%%%%5
%% Summarize the setting and notation
%%    1. recall mazur's result
%%    2. prove mazur's result using duality and nakayama's lemma
%%    3. state main goals
%%         i. t=1
%%         ii. Tm is gorenstein
%%    4. postpone goal i and show (goal i)==>(goal ii) 
%%         == pages of duality computations

\section{Proof of the Gorenstein property}
\index{Gorenstein}
We are considering the situation with respect to $\jon$ although
we could consider $J_1(N)$. 
Let $\T\subset\End\jon$ be the Hecke algebra and let
$\m\subset\T$ be a maximal ideal. Let $\ell$ be the
characteristic of the residue class field $\T/\m$. 
Let $\T_\m=\varprojlim\T/\m^i\T$. 
Then $\T\tensor_{\Z}\Zl=\prod_{\m|\ell}\T_\m$. [[I want to 
put a good reference for this Atiyah-Macdonald like fact here.]]
Each $\T_\m$ acts on $\Tatel \jon$ so we obtain a product decomposition 
$$\Tatel \jon =\prod_{\m|\ell}\Tate_\m \jon.$$ 
We have the following two facts:
\begin{enumerate}
\item $\Tate_\m\jon\neq 0$
\item $\Tatel\jon$ is $\T\tensor\Zl$-autodual and 
each $\Tate_\m\jon$ is $\Zl$-autodual. 
\end{enumerate}
[[autoduality for which dual? I think it is the linear 
dual since this is used.]]

Let $W=J[\m]$, then the action of $\GalQ$ on $W$ gives a representation
of $\GalQ$ over the field $\T/\m$. We compared $W$ with a certain two
dimensional representation $\rhom:\GalQ\into V$ over $\T/\m$.  
Assume unless otherwise stated that $V$ is irreducible
as a $\GalQ$-module. Let $\Tatel=\Tatel\jon$ and $\Tate_\m=\Tate_\m\jon$.
A formal argument due to Mazur\index{Mazur} showed that
$$W^{\ss}\isom V\cross \cdots \cross V=V^{\oplus t}.$$  
We have not yet determined $t$ but we would like to show that $t=1$. 
\begin{defn}
The {\bfseries Pontrjagin dual} of a module $M$ is the module
$M^{\wedge}:=\Hom(M,\Q/\Z)$ where $M$ is viewed as an abelian group
(if $M$ is topological, only take those homomorphisms whose kernel 
is compact).
The {\bfseries linear dual} of a module $M$ over a ring $R$ is
the module $M^*=\Hom_R(M,R)$. 
\end{defn}
\begin{exercise}
Note that $(\Ql/\Zl)^{\wedge}=\Zl$ and $\Zl^{\wedge}=\Ql/\Zl$. 
\end{exercise}
\begin{proof}[Solution.] We can think of $\Ql/\Zl$ as
$$\{\sum_{n=-k}^{-1} a_n\ell^n: k>0\text{ and } 0\leq a_i<\ell\}.$$
Let $(b_i)\in\Zl$ so $b_i\in\Z/\ell^i\Z$ and 
$b_{i+1}\equiv b_i\pmod{\ell^i}$.  Define a map
$\Ql/\Zl\into\Q/\Z$ by $1/\ell^i\mapsto b_i/\ell^i$.
To check that this is well-defined it suffices to
check that $1/\ell^i$ maps to the same place as $\ell\cdot 1/\ell^{i+1}$. 
Now $1/\ell^i\mapsto b_i/\ell^i$ and 
$$\ell\cdot 1/\ell^{i+1}\mapsto \ell\cdot b_{i+1}/\ell^{i+1}=b_{i+1}/\ell^i.$$
So we just need to check that $$b_{i+1}/\ell^i\equiv b_i/\ell^i\pmod{\Z}.$$
This is just the assertion that $(b_{i+1}-b_{i})/\ell^i\in\Z$ which
is true since $b_{i+1}\equiv b_{i}\pmod{\ell^i}$. 
\end{proof}
 
\begin{proposition}
Let the notation be as above, then $t>0.$
\end{proposition}
\begin{proof}
The idea is to use Nakayama's lemma to show that if $t=0$ and hence $W=0$ 
then $\Tate_\m=0$ which is clearly false. But the relation between
$W$ and $\Tate_\m$ is rather convoluted. In fact $J[\ell^{\infty}]$ is the
Pontrjagin dual of $\Tatel^*$, that is, 
$$J[\ell^{\infty}]^{\wedge}=\Tatel^*=\Hom_{\Zl}(\Tatel,\Zl)$$
and
$$(\Tatel^*)^{\wedge}=\Hom(\Tatel^*,\Ql/\Zl)=J[\ell^{\infty}].$$  
[[First: Why are they dual? Second: Why are we homing into
$\Ql/\Zl$ instead of $\Q/\Z$?]]
Looking at the $\m$-adic part shows that 
$$J[\m^{\infty}]=\Hom(\Tate_\m^*,\Ql/\Zl)$$
and hence
$$J[\m]=\Hom(\Tate_\m^*/\m\Tate_\m^*,\Z/\ell\Z).$$
Thus if $J[\m]=0$ then Nakayama's lemma
implies $\Tate_\m^*=0$. By autoduality this implies
$\Tate_\m=0$. 
\end{proof}

We have two goals. The first is to show that $t=1$, i.e.,
that $J[\m]$ is $2$-dimensional over $\T/\m$. The second
is to prove that $\T_\m$ is Gorenstein, i.e., that 
$\T_\m\isom\Hom_{\Zl}(\T_\m,\Zl)$. This is one of the main theorems
in the subject. We are assuming throughout that
$\rho_\m$ is irreducible and $\ell\nd 2N$. Loosely speaking
the condition that $\ell\not|2N$ means that $J[\m]$ has good
reduction at $\ell$ and that $J[\m]$ can be understood
just by understanding $J[\m]$ in characteristic $\ell$. 
We want to prove that $\T_\m$ is Gorenstein because this property 
plays an essential role in proving that $\T_\m$ is a local
complete intersection.\index{complete intersection}
\begin{example}\index{non-Gorenstein}
Let 
$$T=\{(a,b,c,d)\in\Z_p^4 : a\equiv b\equiv c\equiv d\pmod{p}\}.$$
Then~$T$ is a local ring that is not Gorenstein. 
\end{example}

For now we temporarily postpone the proof of the first goal and instead 
show that the first goal implies the second. 
\begin{theorem}
Suppose $J[\m]$ is two dimensional over $\T/\m$ (thus $t=1$). Then
$\T_\m$ is Gorenstein.
\end{theorem}
\begin{proof}
We have seen before that 
\begin{align*}J[\m]&=\Hom_{\Z/\ell\Z}(\Tate^*_\m/\m\Tate^*_\m,\Z/\ell\Z)\\
                   &=\Hom_{\T/\m}(\Tate^*_\m/\m\Tate^*_\m,\T/\m).
\end{align*}
Thus the dual of $\Tate_\m^*/\m\Tate_\m^*$ is two dimensional over
$\T/\m$ and hence $\Tate_\m^*/\m\Tate_\m^*$ itself is two dimensional
over $\T/\m$. By Nakayama's lemma and autoduality of $\Tate_\m$ 
this implies $\Tate_\m$ is generated by 2 elements over $\T_\m$. 
There is a surjection
$$\T_\m\cross\T_\m\onto\Tate_\m.$$ 
In fact it is true that $\rank_{\Zl}\Tate_\m=2\rank_{\Zl}\T_\m$. We 
temporarily postpone the proof of this claim. Assuming this claim and
using that a surjection between $\Zl$-modules of the same rank
is an isomorphism implies that $\Tate_\m\isom\T_\m\cross\T_\m$.
Now $\T_\m$ is a direct summand of the free $\Zl$ module $\Tate_\m$
so $\T_\m$ is projective. A projective module over a local ring
is free. Thus $\T_\m$ is free of rank 1 and hence autodual (Gorenstein). 
[[This argument is an alternative to Mazur's
-- it seems too easy... maybe I am missing something.]] 

We return to the claim that 
$$\rank_{\Zl}\Tate_\m=2\rank_{\Zl}\T_\m.$$
This is equivalent to the assertion that
$$\dim_{\Ql}\Tate_{\m}\tensor_{\Zl}\Ql=2\dim_{\Ql}\T_\m\tensor_{\Zl}\Ql.$$
The module $\Tatel\jon$ is the projective limit of the $\ell$-power
torsion on the Jacobian\index{Jacobian} 
$$J(\C)=\frac{\Hom_{\C}(S_2(\Gamma_0(N),\C),\C)}{H_1(X_0(N),\Z)}.$$
Let $L=H_1(X_0(N),\Z)$ be the lattice. Then $L$ is a $\T$-module and
$\Tatel=L\tensor_{\Z}\Zl$ (since $L/\ell^iL\isom(\frac{1}{\ell^i}L)/L$).  
Tensoring with $\R$ gives
\begin{align*}
L\tensor_{\Z}\R&=\Hom_{\C}(S_2(\Gamma_0(N),\C),\C)\\
               &=\Hom_{\R}(S_2(\Gamma_0(N),\R),\C)\\
               &=\Hom_{\R}(S_2(\Gamma_0(N),\R),\R)\tensor_{\R}\C=(\T\tensor_{\Z}\R)\tensor_{\R}\C
\end{align*}
Thus $L\tensor_{\Z}\R$ is free of rank $2$ over $\T\tensor_{\Z}\R$
and $L\tensor_{\Z}\C$ is free of rank $2$ over $\T\tensor_{\Z}\C$. 
Next choose an embedding $\Ql\hookrightarrow\C$.
Now $\Tatel$ is a module over $\T\tensor\Zl=\prod_{\m|\ell}\T_\m$
so we have a decomposition $\Tatel=\prod_{\m|\ell}\Tate_\m$. Since 
$$\Tate_{\ell}\tensor_{\Zl}\Ql=\prod_{\m}\Tate_\m\tensor_{\Zl}\Ql$$
we can tensor with $\C$ to see that 
$$\Tate_{\ell}\tensor_{\Zl}\C=\prod_{\m}\Tate_\m\tensor_{\Zl}\C.$$  
But $\Tate_{\ell}\tensor_{\Zl}\C=L\tensor_{\Z}\C$ 
is free of rank $2$ over $\T\tensor\C$. Therefore
the product $\prod_{\m}\Tate_\m\tensor_{\Zl}\C$
is free of rank $2$ over $\T\tensor\C$. Since
$$\T\tensor\C=(\T\tensor_{\Z}\Zl)\tensor_{\Zl}\C
      =\prod_{\m}(\T_\m\tensor_{\Zl}\C)$$   
we conclude that for each $\m$, $\Tate_\m\tensor_{\Zl}\C$
is free of rank $2$ over $\T_\m\tensor_{\Zl}\C$.  
This implies 
$$\dim_{\C}\Tate_{\m}\tensor_{\Zl}\C=2\dim_{\C}\T_{\m}\tensor_{\Zl}\C$$
which completes the proof. 
\end{proof}

\subsection{Vague comments}
Ogus\index{Ogus} commented that this same proof shows that 
$\T\tensor_{\Z}\C$ is Gorenstein. Then he said
that something called ``faithfully flat descent''\index{descent}
could then show that $\T\tensor_{\Z}\Q$ is Gorenstein. 

We have given the classical argument of Mazur\index{Mazur} that 
$\T_\m$ is Gorenstein, but we still haven't shown
that $J[\m]$ has dimension $2$. This will be accomplished
next time using Dieudonn\'{e} modules.  

%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 3/13/96
%% Notes for Ribet's 274

%% + Motivating remarks, summary
%% + Define group schemes
%%      Examples:
%%          a) mup   (give maps explicitly for fun)
%%          b) alpha
%% + Define finite flat group scheme	
%% + J[l] as a group scheme 
%% + What groups schemes have to do with what we are trying to prove
%% + Reduce the W=V claim to something about certain finite flat group schemes
%% + Introduce Dieudonne modules, give basic properties
%%        (define Frob, Ver, they arise by contravariant functoriality)
%% + examples of dieudonne modules for the standard finite flat group schemes
%% + Cartier duality
%% + "the hodge filtration on h1dr of an abelian variety
%% + apply the properties of D in the setting of J[l] and ver and frob
%% + give hint as to how the proof will proceed (i.e. must show D(W[ver]) small)

\section{Finite flat group schemes}\index{finite flat schemes}
\begin{defn}Let $S$ be a scheme. Then a 
{\bfseries group scheme over $S$} is a group object
in the category of $S$-schemes. 
\end{defn}
Thus a group scheme over $S$ is a scheme $G/S$ equipped
with $S$-morphisms $m:G\cross G\into G$, $\text{inv}:G\into G$
and a section $1_G:S\into G$ satisfying the usual group axioms.

Suppose $G$ is a group scheme over the finite field $\Fq$. If
$R$ is an $\Fq$-algebra then $G(R)=\Mor(\Spec R,G)$ is
a group. It is the group of $R$-valued points of $G$. 

We consider several standard examples of group schemes.
\begin{example} The multiplicative group scheme $G_m$ 
is $G_m=\Spec\Z[x,\frac{1}{x}]$ with morphisms. [[give maps, etc.]]
The additive group scheme is $\Spec\Z[x]$...
\end{example}
\begin{example} The group scheme $\Mu_p$ is the kernel
of the morphism $G_m\into G_m$ induced by $x\mapsto x^p$. 
Thus $\Mu_p=\Spec\Z[x]/(x^p-1)$ and so for any $\Fq$-algebra
$R$ we have that $\Mu_p(R)=\{r\in R : r^p=1\}$. 
The group scheme $\alpha_p$ is the kernel of the morphism
$G_a\into G_a$ induced by [[what!! what is alphap?? it
should be the additive group scheme of order p, no?]].
\end{example}

Let $A$ be a finite algebra over $\Fp$ and suppose $G=\Spec A$ 
affine group scheme (over $\Fp$). Then the {\bfseries order} of
$G$ is defined to be the dimension of $A$ as an $\Fp$ vector space. 

\begin{example} Let $E/\Fp$ be an elliptic curve. Then $G=E[p]$
is a group scheme of order $p^2$ [[why is this true?]]. 
This is wonderful because this is the order that $E[p]$ 
should have in analogy with the characteristic $0$ situation.
When we just look at points we have	
$$\#G(\overline{\Fp})=\begin{cases}1&\text{ supersingular}\\
                                   p&\text{ ordinary}\end{cases}.$$
\end{example}

\section{Reformulation of $V=W$ problem} 
Let $J=\jon$ be the Jacobian\index{Jacobian} of $\xon$. Then $J$ is defined over $\Q$
and has good reduction at all primes not dividing $N$. Assume $\ell$
is a prime not dividing $N$. $J[\ell]$ extends to a finite flat group\index{finite flat schemes}
scheme over $\Z[\frac{1}{N}]$. This is a nontrivial result of Grothendieck\index{Grothendieck}
(SGA 7I, LNM 288). Since $\ell\nd N$, $J[\ell]$ gives rise to 
a group scheme over $\Fl$. 

We have ``forcefully'' constructed a Galois representation 
$\rho_\m:G\into V$ of dimension $2$ over $\T/\m$. Our goal is to show that
this is isomorphic to the naturally defined Galois representation
$W=J[\m]$. So far we know that $$0\subset V\subset W\subset J[\ell].$$
Our assumptions are that $\ell\nd N$, $V$ is irreducible, and $\ell\neq 2$.

Let $\uJ$ be $J$ thought of as a scheme over $\Zl$. Grothendieck\index{Grothendieck} showed
that $\uJ$ is the spectrum of a free finite $\Zl$-module. Raynaud (1974)
showed that if $\ell\neq 2$ then essentially everything about 
$\uJ[\ell]$ can be seen in terms of $J[\ell](\overline{Q}_{\ell})$. 
He goes on to construct group scheme $\uV$ and $\uW$ over $\Zl$
such that $$\uV\subset\uW\subset\uJ[\ell].$$  

Our goal is to prove that the inclusion $V\hookrightarrow W$ of
Galois modules is an isomorphism. Raynaud showed noted that the category
of finite flat group schemes\index{finite flat schemes} over $\Zl$ is an abelian category so
the cokernel $\uQ=\uW/\uV$ is defined. Furthermore, $V=W$ if and only if $\uQ=0$. 
Since $\uQ$ is flat $\uQ_{\Fl}$ has the same dimension over $\Fl$
as $\uQ_{\Ql}$ has over $\Ql$. Passing to characteristic $\ell$ yields
an exact sequence
$$0\into \uV_{\Fl}\into \uW_{\Fl}\into \uQ_{\Fl}\into 0.$$ 
Thus $V\hookrightarrow W$ is an isomorphism if and only if $\uV_{\Fl}\hookrightarrow
\uW_{\Fl}$ is an isomorphism. Since $\uV$, $\uW$, and $\uQ$ have an action
of $k=\T/\m$ that are $k$-vector space schemes. This leads us to
Dieudonn\'{e} theory.

\section{Dieudonn\'{e} theory}
Let $G/k$ be a finite $k$-vector space scheme where $k$ is a finite
field of order $q$. 
Suppose $G$ has order $q^n$ so 
$G$ is locally the spectrum of a rank $n$ algebra over $k$. 
The Dieudonn\'{e} functor contravariantly associates to $G$ 
an $n$ dimensional $k$-vector space $D(G)$.  
Let $\Frob:G\into G$ be the morphism induced by the $p$th power
map on the underlying rings and let $\Ver$ be the dual of $\Frob$. 
Let $\varphi=D(\Frob)$ and $\nu=D(\Ver)$, then it is a property of
the functor $D$ that $\varphi\circ\nu=\nu\circ\varphi=0$.
The functor $D$ is a fully faithful functor. 

\begin{example}
Let $k=\F_p$. If $G$ is either $\Mu_p$, $\alpha_p$, or $\Z/p\Z$ 
then $D(G)$ is a one-dimensional vector space over $k$.
In the case of $\alpha_p$, $\varphi=\nu=0$. For $\Mu_p$, 
$\varphi=0$ and $\nu\neq 1$ and for $\Z/p\Z$, $\varphi\neq 1$ and $\nu=0$.
[[The latter two could be reversed!]] 
\end{example}

Let $G^{\vee}=\Hom(G,\Mu_p)$ denote the Cartier dual of the scheme $G$.
Then 
$$D(G^{\vee})=\Hom_k(D(G),k)$$
($\varphi$ and $\nu$ are switched.)

\begin{example}
Let $A/\Fl$ be an abelian variety and let $G=A[\ell]$. Then
$G$ is an $\Fl$-vector space scheme of order $\ell^{2g}$. Thus
$D(G)$ is a 2$g$-dimensional $\Fl$-vector space and furthermore
$D(G)=H^1_{DR}(A/\Fl)$.
The Hodge filtration on $H^1_{DR}$ of the abelian variety $A$ gives
rise to a diagram
$$\xymatrix{
  && \Hom(H^0(A^{\dual},\Omega^1),\Fl)\ar@{=}[r] 
           & \Tan(A^{\dual})\ar@{=}[d]\\
 H^0(A,\Omega^1)\ar@{^(->}[r]
    & D(G)\ar[r]&H^1_{DR}(A/{\Fl})\ar@{->>}[r]\ar@{=}[d]
                &H^1(A,\cO)\ar@{=}[d]\\
 &    & {D(A[\ell])}\ar@{->>}[r]& {D(A[\Ver])}
}$$
\end{example}

There is an exact sequence 
$$0\into W_{\Fl}\into J_{\Fl}[\ell]\xrightarrow{\m} J_{\Fl}[\ell]$$
so because $D$ is an exact functor the sequence
$$D(J_{\Fl}[\ell])\xrightarrow{\m}D(J_{\Fl}[\ell])\into D(W_{\Fl})\into 0$$
is exact. 
Following Fontaine we consider
$$D(W_{\Fl}[\Ver])=H^1(J,\cO)/\m H^1(J,\cO).$$ 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%3/19/96

\section{The proof: part II}
[[We all just returned from the Washington D.C. conference and
will now resume the proof.]]

Let $\jon$ be the Jacobian\index{Jacobian} of $\xon$. Let $\m\subset\T$ be
a maximal ideal and suppose $\m|\ell$. Assume that $\ell\neq 2$
and $\ell\nd N$. The assumption that $\ell\neq 2$ is necessary
for Raynaud's theory and we assume that $\ell\nd N$ so that our
group schemes will have good reduction. We attach to $\m$ a
$2$ dimensional semisimple representation $\rho_{\m}:\GalQ\into V$
and only consider the case that $\rho_{\m}$ is irreducible.

The $\m$-torsion of the Jacobian, $W=J_0(\overline{\Q})[\m]$,
is naturally a Galois module. We have
shown that $W\neq 0$. By \cite{boston-lenstra-ribet}
$W\isom V\cross\cdots\cross V$ (the number of fractions is
not determined). We proved that $W^{s.s.}\isom V\cross\cdots\cross V$.
Choose an inclusion $V\hookrightarrow W$ and let
$Q=W/V$ be the cokernel. 

\begin{theorem} $Q=0$ so $\dim_{\T/\m}W=2$ \end{theorem}

To prove the theorem we introduce the ``machine'' of finite
flat group schemes over $\Zl$. For example, $W$ extends to a
finite flat\index{finite flat schemes} group scheme $W_{\Zl}$ which is defined to be the
Zariski closure of $W$ in $J_{\Zl}[\ell]$. 
Passing to group schemes yields an exact sequence
$$0\into V_{\Zl}\into W_{\Zl}\into Q_{\Zl}\into 0.$$
Reducing mod $\ell$ then yields an exact sequence of 
$\Fl$-group schemes 
$$0\into V_{\Fl}\into W_{\Fl}\into Q_{\Fl}\into 0.$$
The point is that $Q=0$ if and only if $Q_{\Zl}=0$ if and only if $Q_{\Fl}=0$. 

Next we introduced the exact contravariant Dieudonn\'{e} functor
$$D:(\text{ Groups Schemes }/\Fl\text{ })\longrightarrow(\text{ Linear Algebra }).$$
$D$ sends a group scheme $G$ to a $\T/\m$ vector space equipped with
two endomorphisms $\varphi=\Frob$ and $\nu=\Ver$. 
Applying $D$ gives an exact sequence of $\T/\m$-vector spaces
$$0\into D(Q)\into D(W)\into D(V)\into 0$$
where everything is now viewed over $\Fl$. 

\begin{lemma} $D(W[\Ver])=(H^0(\xon_{\Fl},\Omega^1)[\m])^{*}$ \end{lemma}
\begin{proof}
%%[[Disclaimer: I don't understand this proof yet.]]
We have the diagram 
$$\begin{array}{ccc}
D(J_{\Fl}[\ell])&=&H^1_{DR}(J_{\Fl})\\
\downarrow&&\downarrow\\
D(J_{\Fl}[\Ver])&=&H^1(J_{\Fl},\cO_{J_{\Fl}})\\
\downarrow&&\downarrow\\
D(W[\Ver])&=&H^1(J_{\Fl},\cO_J)/\m{}H^1(J_{\Fl},\cO_J)
\end{array}$$
Furthermore we have the identifications
\begin{align*}
H^1(J_{\Fl},\cO_J)&=\Tan(J_{\Fl}^{\dual})=\Cot(J_{\Fl}^{\dual})^{*}\\
                  &=H^0(J^{\dual},\Omega^1)^*=H^0(\xon,\Omega^1)^{*}
\end{align*}
For the last identification we must have $J^{\dual}=\Alb(\xon)$. 
Finally
\begin{align*}
D(W[\Ver])&=H^1(J,\cO_J)/\m H^1(J,\cO_J)\\
          &=(H^0(\xon_{\Fl},\Omega^1)[\m])^*.
\end{align*}
\end{proof}

\begin{lemma}
$H^0(\xon_{\Fl},\Omega^1)[\m]$ has $\T/\m$ dimension $\leq 1$.
\end{lemma}
\begin{proof}
Let $S=H^0(\xon_{\Fl},\Omega^1)[\m]$. Then $S\hookrightarrow \Fl[[q]]$.
We defined the Hecke operators $T_n$ on $S$ via the identification
$S\isom H^1(J,\cO_J)$ so that they act on $S\subset\Fl[[q]]$ in
the standard way. 
Let $\T(S)$ be the subalgebra of $\End(S)$ generated by the images
of the $T_n$ in $\End(S)$. ($\T(S)$ is not a subring of $\T$.) There
is a perfect pairing
\begin{align*}\T(S)\cross S&\longrightarrow\Fl\\
(T,f)&\mapsto a_1(f|T)\end{align*}
Thus $\dim_{\Fl}\T(S)=\dim_{\Fl} S$ and so
$\dim_{\T(S)}S\leq 1$. Since $\m$ acts trivially on $S$ there is a
surjection $\T/\m\onto\T(S)$. Thus 
$$\dim_{\T/\m}S\leq \dim_{\T(S)}S\leq 1$$
as desired. 
\end{proof}

An application of the above lemma shows that $D(W[\Ver])$
has $\T/\m$ dimension $\leq 1$. 

\begin{lemma} $D(W[\Ver])\isom D(V[\Ver])$ \end{lemma}
\begin{proof}
Consider the following diagram.
$$\xymatrix@=1.3pc{
    & 0\ar[d]            &  0\ar[d]          &  0\ar[d]    & \\
  0\ar[r] &D(Q)\ar[r]\ar[d]^{\Ver}  & D(W)\ar[r]\ar[d]^{\Ver} 
          &D(V)\ar[r]\ar[d]^{\Ver}   & 0\\
  0\ar[r] &D(Q)\ar[r]\ar[d] & D(W)\ar[r]\ar[d] &D(V)\ar[r]\ar[d]  & 0\\
  0\ar[r] &D(Q)/\Ver D(Q)\ar[d]\ar[r]&D(W)/\Ver D(W)\ar[d]\ar[r]^{?\isom?} &D(V)/\Ver D(V)\ar[r]\ar[d]& 0\\
    &0             & 0           & 0 
}$$
$D(V)$ has dimension 2 so since $\Ver\circ\Frob=\Frob\circ\Ver=0$
and $\Ver$, $\Frob$ are both nonzero they must each have rank 1 (in
the sense of undergraduate linear algebra). Since $D$ is exact,
$D(V[\Ver])=D(V)/\Ver D(V)$ and $D(W[\Ver])=D(W)/\Ver D(W)$.
By the previous lemma $\dim D(W)/\Ver D(W)=1$. Thus 
$D(W)/\Ver D(W)\into D(V)/\Ver D(V)$ is a map of 1 dimensional
vector spaces so to show that it is an isomorphism we just need
to show that it is surjective. This follows from the  
commutativity of the square
$$\xymatrix{
D(W)\ar[r]\ar[d]&D(V)\ar[r]\ar[d]&0\\
D(W)/\Ver D(W)\ar[r]&D(V)/\Ver D(V)\ar[d]\\
&0}$$  
\end{proof}
 
Suppose for the moment that we admit \cite{boston-lenstra-ribet}.
Then $$W= V\cross\cdots\cross V=V^{\oplus t}$$
so $$D(W[\Ver])\isom D(V[\Ver])^{\oplus t}$$
and hence $t=1$. 

Alternatively we can avoid the use of \cite{boston-lenstra-ribet}.
Suppose $Q\neq 0$. Then there is
an injection $V\hookrightarrow Q$. [[I can't see this without
using B-L-R. It isn't obvious to me from 
$0\into V\into W\into Q\into 0$.]]
Thus over $\Fl$,
$V[\Ver]\hookrightarrow Q[\Ver]$. Since 
$V[\Ver]\neq 0$ this implies $Q[\Ver]\neq 0$. Thus
$D(Q)/\Ver D(Q)=D(Q[\Ver])\neq 0$. 
But the bottom row of the above diagram implies
$D(Q)/\Ver D(Q)=0$ so $Q=0$. 

\section{Key result of Boston-Lenstra-Ribet}
Let $G$ be a group (i.e., $G=\GalQ$), let
$k$ be a field (i.e., $k=\T/\m$), and let
$V$ be a two dimensional $k$-representation of $G$
given by $$\rho:k[G]\into\End_k(V)=M_2(k).$$ 
The key hypothesis is that $V$ is absolutely irreducible,
i.e., that $\rho$ is surjective. For each $g\in G$ consider
$$p_g=g^2-g\tr\rho(g)+\det\rho(g)\in k[G].$$
By the Cayley-Hamilton theorem $\rho(p_g)=0$. 
Let $J$ be the two-sided ideal of $k[G]$ generated
by all $p_g$ such that $g\in G$. Since $J\subset\ker\rho$
, $\rho$ induces a map 
$$\sigma:k[G]/J\into \End_k(V).$$
\begin{theorem}[Boston-Lenstra-Ribet] If $\sigma$ is surjective
then $\sigma$ is an isomorphism.
\end{theorem}
In particular if $V$ is absolutely irreducible then
$\sigma$ is surjective. The theorem can be false when $\dim V>2$. 

Suppose $W$ is a second representation of $G$ given by
$\mu:k[G]\into\End(W)$ and that $\mu(J)=\{0\}\subset\End(W)$. 
Then $W$ is a module over $k[G]/J=\End(V)$. 
But $\End(V)$ is a semisimple ring so any $\End(V)$ module
is a direct sum of simple $\End(V)$ modules. The only simple
$\End(V)$ module is $V$. Thus $W\isom{}V^{\oplus ^n}$ for some $n$. 


\chapter{Local Properties of $\rho_{\lambda}$}
Let $f$ be a newform of weight $2$ on $\gon$. To $f$ we have associated
an abelian variety $A=A_f$ furnished with an action of
$E=\Q(\ldots,a_n(f),\ldots)$. Let $\cOE$ be the ring of 
integers of $E$ and $\lambda\subset\cOE$ a prime. Then we obtain
a $\lambda$-adic representation 
$$\rholam:\GalQ\into\GL_2(E_{\lambda})$$ 
on the Tate module $\Tatel A=\varprojlim A[\lambda^i]$. 
We will study the local properties of $\rholam$ at various 
primes $p$. 
\section{Definitions}\label{def:decompgroup}
To view $\rholam$ locally at $p$ we restrict to the
decomposition group $D_p=\GalQ$ at $p$. Recall the
definition of $D_p$.  
Let $K$ be a finite extension of $\Q$ and let $w$ be a prime
of $K$ lying over $p$. 
Then the decomposition group at $w$
is defined to be
$$D_w=\{\sigma\in\Gal(K/\Q) : \sigma w =w\}.$$
\begin{proposition} $D_w\isom\Gal(K_w/\Qp)$ \end{proposition} 
\begin{proof} Define a map $\Gal(K_w/\Qp)\into D_w$ by
$\sigma\mapsto\sigma_{|K}$. Since $\sigma_{|K}$ fixes
$\Q$ this restriction is an element of $\Gal(K/Q)$. 
Since $w\cO_{K_w}$ is the unique maximal ideal of $\cO_{K_w}$
and $\sigma$ induces an automorphism of $\cO_{K_w}$, it follows that
$\sigma(w\cO_{K_w})=w\cO_{K_w}$. Thus $\sigma_{|K}(w)=w$ so
$\sigma_{|K}\in D_w$. The map $\sigma\mapsto \sigma_{|K}$ is 
bijective because $K$ is dense in $K_w$.\end{proof}

Let 
$$D_p=\varprojlim_{w|p}D_w=\varprojlim_{w|p}\Gal(K_w/\Qp)=\Gal(\overline{\Q}_p/\Qp).$$
For each $w|p$ let the inertia group $I_w$ be the kernel of 
the map from $D_w$ into $\Gal(\cO_K/w,\Z/p\Z)$. Let $I_p=\varprojlim_{w|p} I_w$. 

\section{Local properties at primes $p\nmid N$}\label{localpnmidN}
Next we study local properties of $\rholam$ at primes $p\nd{}N$. 
Thus suppose $p\nd{}N$ and $p\neq\ell=\Char(\cOE/\lambda)$. Let
$D_p=\GalQp$. Then
\begin{itemize}
\item[1)] $\rholam{|D_p}$ is unramified (i.e., $\rholam(I_p)=\{1\}$) thus
$\rholam{|D_p}$ factors through $D_p/I_p$ so $\rholam(\Frobp)$ is
defined. 
\item[2)] $\tr(\rholam(\Frobp))=a_p(f)$
\item[2+)] We can describe $\rholam{|D_p}$ up to isomorphism.
It is the unique semisimple representation satisfying 1) and 2). 
\end{itemize}
\section{Weil-Deligne Groups}
Notice that everything is sort of independent of $\lambda$. 
Using Weil-Deligne groups we can summarize all of these $\lambda$-adic
representations in terms of data which makes $\lambda$ disappear. 

We have an exact sequence
$$1\into I_p\into\Gal(\overline{\Q}_p/\Qp)\into\Gal(\overline{\F}_p/\Fp)\into 0.$$
Since $\Gal(\overline{\F}_p/\F_p)=\hat{\Z}$ there is an injection
$\Z\hookrightarrow\Gal(\overline{\F}_p/\F_p)$. 
Define the Weil group $W(\overline{\Q}_p/\Qp)\subset\Gal(\overline{\Q}_p/\Qp)$
to be the set of elements of $\Gal(\overline{\Q}_p/\Qp)$ mapping
to $\Z\subset\Gal(\overline{\F}_p/\Fp)$. 
$W$ fits into the exact sequence
$$1\into I_p\into W(\overline{\Q}_p/\Qp)\into\Z\into 1.$$

There is a standard way in which the newform $f$ gives rise to
a representation of $W$. Factor the polynomial $x^2-a_p(f)x+p$ as
a product $(x-r)(x-r')$ with $r,r'\in\C$. Define maps
$\alpha$, $\beta$ by 
$$\alpha:\Z\into\C^* : 1\mapsto r$$
$$\beta:\Z\into\C^* : 1\mapsto r'$$
Combining $\alpha$ and $\beta$ and the map $W(\overline{\Q}_p/\Qp)\into \Z$
yields a map
$$\alpha\oplus\beta:W(\overline{\Q}_p/\Qp)\into\GL_2(\C)$$
$$\sigma\mapsto\Bigl(\begin{matrix}\alpha(\sigma)&0\\0&\beta(\sigma)\end{matrix}\Bigr).$$
Moreover $\alpha\oplus\beta$ gives rise via some construction to all
the $\lambda$-adic representations $\rholam$. 

\section{Local properties at primes $p\mid{}N$}
Suppose $p|N$ but $p\neq\ell$. Carayol was able to generalize
1) in his thesis which builds upon the work of Langlands and Deligne
in the direction of Deligne-Rapaport and Katz-Mazur. The idea is that
the abelian variety $A$ has a conductor which is a positive integer
divisible by those primes of bad reduction.  The conductor of $A$ satisfies
$\cond(A)=M^g$ where $g=\dim A$ and $M$ is the reduced conductor of $A$. 
\begin{theorem}[Carayol] $M=N$. \end{theorem}

How can we generalize 2) or 2+)? For each $p$ dividing $N$ there is a
representation $\sigma_p$ of $\WD(\overline{\Q}_p/\Qp)$ over $\C$
such that $\sigma_p$ gives rise to $\rholam{|D_p}$ for all $\lambda\nd{}p$.
Here $\WD(\overline{\Q}_p/\Qp)$ is the Weil-Deligne group which is 
Deligne's generalization of the Weil group. $\WD(\overline{\Q}_p/\Qp)$
is an extension of $W(\overline{\Q}_p/\Qp)$. What is $\sigma_p$ supposed
to be? The point is that $\sigma_p$ is determined by $f$. Thus every
$f$ gives rise to a family $(\sigma_p)_{\text{$p$ prime}}$. To 
really think about $\sigma_p$ we must think about modular forms in an
adelic context instead of viewing them as holomorphic functions on the 
complex upper halfplane.

If $p^2|N$ and $f=\sum a_n q^n$ is a newform of level $p^2$
then it is a classical fact that $a_p=0$. But the study
of $\rholam{|D_p}$ is rich and ``corresponds to a rather
innocuous looking crystal''.

\section{Definition of the reduced conductor}
We now define the reduced conductor. Let $\lambda$ be a
prime of $E$ and $p$ a prime of $\Q$ such that
$\lambda\nd{}p$. We want to define some integer $e(p)$ 
so that $p^{e(p)}$ is the $p$-part of the reduced conductor.
We will not define $e(p)$ but what we will do is define
an integer $e(p,\lambda)$ which is the $p$ part of the conductor.
$e(p,\lambda)$ is independent of $\lambda$ but this will not
be proved here. 

Consider 
$$\rholam{|D_p}:\Gal(\overline{\Q}_p/\Qp)\into\Aut_{E_{\lambda}} V.$$
Let $V^I\subset V$ be the inertia invariants of $V$, i.e., 
$$V^I=\{v\in V:\rho_{\lambda}(\sigma)(v)=v \text{ for all } \sigma\in I\}.$$
Since $\rholam$ is unramified at $p$ if and only if $\rholam(I_p)=\{1\}$ we
comment that $\rholam$ is unramified at $p$ if and only if $V^I=V$. 
Let $$e(p,\lambda)=\dim V/V^I + \delta(p,\lambda)$$
where $\delta(p,\lambda)$ is the Swan conductor. By working with 
finite representations we define $\delta(p,\lambda)$ as follows. 
Choose a $D_p$-stable lattice $L$ in $V$ by first choosing an arbitrary
one then taking the sum of its finitely many conjugates. 
Let $\overline{V}=L/\lambda L$ which is a $2$ dimensional
vector space over $k=\cOE/\lambda$. Let $G$ be the quotient of 
$\Gal(\overline{\Q}_p/\Qp)$ by the kernel of the map
$\Gal(\overline{\Q}_p/\Qp)\into\Aut_K\overline{V}$. 
Thus $G=\Gal(K/\Qp)$ for some finite extension $K/\Qp$. 
The extension $K$ is finite over $\Qp$ since 
$G\subset\Aut_k\overline{V}$ and $\Aut_k\overline{V}$
is a $2\times 2$ matrix ring over a finite field. 
The corresponding diagram is
$$\xymatrix{
{\Gal(\Qbar_p/\Qp)}\ar[r]\ar[dr]&{\Aut_k\overline{V}}\\
                       &{G=\Gal(K/\Qp)}\ar[u]}$$

Consider in $G$ the sequence of ``higher ramification groups''
$$G=G_{-1}\supset G_0\supset G_1\supset\cdots.$$
Here $G_0$ is the inertia group of $K/\Qp$ and $G_1$ is the
$p$-sylow subgroup of $G_0$ [[the usages of ``the'' in this
sentence makes me nervous.]] Let $G_i=\{g\in G_0 : \ord(g\pi-\pi)\geq i+1\}$
where $\pi$ is some kind of uniformizing parameter [[I missed this -- what
is $\pi$?]] Let 
$$\delta(p,\lambda)=\sum_{i=1}^{\infty} \frac{1}{(G_0:G_i)}\dim(\overline{V}/\overline{V}^{G_i}).$$
It is a theorem that $\delta(p,\lambda)$ is an integer and does not depend 
on $\lambda$. 

If to start with we only had $\overline{V}$ and not $V$ we could
define 
$$\cond(\overline{V})=\sum_{i=0}^{\infty}\frac{1}{(G_0:G_i)}\dim(\overline{V}/\overline{V}^{G_i}).$$
Then $$e(p,\lambda)=\cond(\overline{V})+(\dim \overline{V}^I-\dim V^I).$$ 

A reference for much of this material is Serre's\index{Serre}
{\em Local Factors of $L$-functions of $\lambda$-adic Representations}. 

%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Notes for Ribet's 274
%% 3/22/96

\chapter{Adelic Representations}
Our goal is to study local properties of the 
$\lambda$-adic representations $\rholam$ arising
from a weight $2$ newform of level $N$ on 
$\gon$. There is a theorem of Carayol which states
roughly that if $p\neq\ell$ then $\rholam|D_p$
is predictable from ``the component at $p$ of
$f$''. To understand this theorem we
must understand what
is meant by ``the component at $p$ of $f$''. 
If $p^2\nd{}N$ this component is easy to determine
but if $p^2|N$ it is harder. One reason is that
when $p^2|N$ then $a_p(f)=0$. [[this should be
easy to see so there should be an argument here.]]
If $a_p(f)=0$ and $\rholam:\GalQ\into\Aut(V_{\lambda})$
then $V_{\lambda}^{I_p}=0$. This means that there
is no ramification going on at $p$. See Casselman,
``On representations of $GL(2)$ and the arithmetic
of modular curves'', Antwerp II.\index{modular curves}

\section{Adelic representations associated to modular forms}
Let $R$ be a subring of $\A^2=\R^2\cross(\hat{\Z}\tensor_{\Z}\Q)^2$,
suppose that $R\isom\Q^2$ and that $\R\tensor_{\Q}\A\isom\A^2$. 
Let $L=R\intersect(\R^2\cross\hat{\Z}^2)$. Then the
natural map $L\tensor\hat{\Z}\into\Z^2$ is an isomorphism.
[[Is the isomorphism implied by the definition of $L$
or is it part of the requirement for $L$ to actually
form an adelic lattice?]] $L$ is called an
{\em adelic lattice}. 

The space of modular forms $S_2(\gon)$ is isomorphic to
a certain space of functions on $G(\A)=\GL(2,\A)$. 
See Borel-Jacquet [[Corvallis?]] or 
Diamond-Taylor, Inventiones Mathematica, 115 (1994)
[[what is title?]] We will describe this isomorphism.

Write $\A=\R\cross\A_f=\A_{\infty}\cross\A^{\infty}$
where $\A_f=\prod\Qp$ (restricted product) is the ring of finite
adeles. $\A_{\infty}$ denotes the adeles with respect to the place
$\infty$ so $\A_{\infty}=\R$, and $\A^{\infty}$ denotes the
adeles away from the place $\infty$ so $\A^{\infty}=\A_f$. 

$S_2(\gon)$ is isomorphic to the set of functions
$\varphi:G(\A)\into\C$ which satisfy
\begin{itemize}
\item[0)] $\varphi$ is left invariant by
$G(\Q)$, i.e., $\varphi(x)=\varphi(gx)$ for
all $g\in G(\Q)$ and all $x\in G(\A)$, 
\item[1)] $\varphi(xu^{\infty})=\varphi(x)$ for all
$x\in G(\A)$ and all $u^{\infty}\in U^{\infty}$, 
\item[2)] $\varphi(xu_{\infty})=\varphi(x)j(u_{\infty},i)^{-k}\det(u_{\infty})$
   for all $x\in G(\A)$ and $u_{\infty}\in U_{\infty}$, 
\item[3)] holomorphy, cuspidal, and growth conditions.
\end{itemize}
$U^{\infty}$ is the adelic version of $\gon$. Thus $U^{\infty}$
is the compact open subgroup
$$U^{\infty}=\{\Bigl(\begin{matrix}a&b\\c&d\end{matrix}\Bigr)\in\GL_2(\hat{\Z}):
               c\equiv 0\pmod{N}\}\subset G(\A_f).$$
(For $\Gamma_1(N)$ the condition is that $c\equiv 0\pmod{N}$
and $d\equiv 1\pmod{N}$ but $a$ is not restricted.)

Next we describe $U_{\infty}\subset\GL_2(\R)$. $\GL_2(\R)$
operates on $\sH^{\pm}=\C-\R$ by
$z\mapsto\frac{az+b}{cz+d}$. Let $U_{\infty}$ be
the stabilizer of $i$. 

The third condition involves the {\em automorphy factor}
$j$ defined by 
$$j(\Bigl(\begin{matrix}a&b\\c&d\end{matrix}\Bigr),z)=cz+d.$$
To explain the holomorphy condition 3) we define, for
any $g\in G(\A_f)$ a map
$$\alpha_{g,\varphi}:\sH^{\pm}\into\C$$
$$hi\mapsto\varphi(gh)j(h,i)^k(\det(h))^{-1}.$$
Here $h\in G(\A_f)$ so $hi\in\sH^{\pm}$. There may be
several different $h\in G(\A_f)$ which give the same
$hi\in\sH^{\pm}$ so it must be checked that 
$\alpha_{g,\varphi}$ is well-defined. Suppose
$hi=h'i$, then $h^{-1}h'i=i$. Thus $h^{-1}h'\in U_{\infty}$,
so by $2)$, 
$$\varphi(gh^{-1}h')=\varphi(g)j(h^{-1}h',i)^{-k}\det(h^{-1}h').$$
Thus $$\varphi(gh^{-1}h')\det(h')^{-1}=\varphi(g)j(h^{-1}h',i)^{-k}\det(h)^{-1}.$$
Substituting $gh$ for $g$ yields
$$\varphi(gh')(\det(h'))^{-1}=\varphi(gh)j(h^{-1}h',i)^{-k}(\det(h))^{-1}.$$
[[The the automorphy factor work out right.  Why?]]
The holomorphy condition is that the family of maps 
$\alpha_{g,\varphi}$ are all holomorphic.

The cuspidal condition is that for all $g\in G(\A)$, the integral
$$\int_{u\in\A/\Q} \varphi(\bigl(\begin{smallmatrix}1&u\\0&1\end{smallmatrix}\bigr),g)du=0$$
vanishes. Since $\A/\Q$ is compact it has a Haar measure defined modulo
$k^{*}$ which induces $du$. Although the integral is not well-defined
the vanishing or non-vanishing of the integral is. 

We can now describe the isomorphism between $S_k(\gon)$ and the space 
of such functions $\varphi$ on $G(\A)$. 
$$\{\text{ space of $\varphi$ satisfying 0-3}\}\into S_k(\gon)$$
$$\varphi\mapsto f$$
where $f$ is the restriction to $\sH=\sH^{+}$ of the function
$$hi\mapsto\varphi(h)j(h,i)^k(\det h)^{-1}.$$

Now we can associate to a newform $f$ a representation of
$G(\A)$. We can weaken condition 1) to get
\begin{itemize}
\item[1-)] $\varphi(xu^{\infty})=\varphi(x)$ for all $x\in G(\A)$
and all $u^{\infty}\in U^{\infty}$ where $U^{\infty}$ is 
{\em some} compact open subgroup of $G(\A_f)$. 
\end{itemize}
[[can the $U^{\infty}$ vary for each $x\in G(\A)$ or
are they fixed throughout?]]
Let $\sS$ be the space of all functions satisfying all
conditions except 1-) replaces 1). 
This space has a left action of $G(\A)$:
$$(g*\varphi)(x)=\varphi(xg)$$
If $f$ is a newform corresponding to some $\varphi$ via
the above isomorphism then via this action $f$ gives rise to an infinite
dimensional representation $\pi$ of $G(\A)$. In fact
we obtain, for each prime $p$, a representation $\pi_p$
of $\GL(2,\Qp)$. The representation space is
$\sum_{g\in\GL_2(\Qp)}\C\cdot{}g*\varphi$. Our immediate
goal is to understand $\pi_p$ for as many $p$ as possible. 
[[spherical representations have something to do with 
this. are the $\pi_p$ spherical reps?]]

%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Notes for Ribet's 274
%% 4/1/96

We are studying local properties of the $\lambda$-adic representations
$\rho_{\lambda}$ associated to a newform $f$ of weight $2$, level 
$N$ and character $\varepsilon:(\Z/N\Z)^*\into\C^*$
(with $\cond(\varepsilon)|N$). Let $\ell\in\Z$ be the prime over which
$\lambda$ lies. We look at $\rho_{\lambda}$ locally at $p$, $p\neq\ell$. 

As we saw last time $f$ gives rise to an irreducible representation
of $\GL(2,\A)$. An irreducible representation of $GL(2,\A)$ gives rise
to a family of representations $(\pi_v)$ where $v$ is a prime
or $\infty$ and $\pi_v$ is an irreducible representation of $\GL(2,\Q_v)$.
This is because $\Q_v\subset\A$ so $\GL(2,\Q_v)\subset\GL(2,\A)$.

Carayol proved that if $p\neq\ell$ then $\rho_{\lambda}|_{D_p}$ depends,
up to isomorphism, only on $\pi_p$. The most difficult
case in the proof of this theorem is when $p^2\nd{}N$. 
The tools needed to obtain a proof
were already available in the work of Langlands [1972]. 

To get an idea of what is going on we will first consider the case when
$p\nd{}N$. The characteristic polynomial of Frobenious (at least psychologically)
under the representation $\rho_{\lambda}|_{D_p}$ is 
$$x^2-a_px+p\varepsilon(p)=(x-r)(x-s).$$ 
Because of Weil's proof of the Riemann hypothesis for abelian varieties [over
finite fields?] one knows that 
$|r|=|s|=\sqrt{p}$. Since $\rho_{\lambda}$ arises from the action of 
Galois on an abelian variety which has good
reduction at $p$ (since $p\nd{}N$) it follows that $\rho_{\lambda}|_{D_p}$ 
is unramified. [[Is this in Serre-Tate, 1968?]] We also know that 
$\rholam(\Frob_p)$ has characteristic polynomial 
$$x^2-a_px+p\varepsilon(p)\in E[x].$$ 
In this situation one also knows that $\rholam(\Frob_p)$ is semisimple
[[proof: Ribet nodded at Coleman who smiled at nodded back.]] Thus
$$\rholam\sim\Bigl(\begin{matrix}r&0\\0&s\end{matrix}\Bigr).$$ In
this situation what is the representation $\pi_p$ of $\GL(2,\Q_p)$?
There are two characters 
$$\alpha,\beta:\Qp^*\into\C^*$$
(called ``Gr\"ossencharacters of type (a,0)'') such that
\begin{enumerate}
\item $\alpha$ and $\beta$ are unramified in the sense that
$$\alpha|_{\Zp^*}=\beta|_{\Zp^*}=1.$$
This is a reasonable condition since under some sort of local
class field theory $\Qp^*$ embeds as a dense subgroup of 
$\Gal(\Qpbar/\Qp)$ and under this embedding the inertia
subgroup $I\subset\Gal(\Qpbar/\Qp)$ corresponds to 
$\Zp^*$. [[This could be wrong. Also, is $I\intersect\Qp^*=\Zp^*$?]]
\item $\alpha(p^{-1})=r$, $\beta(p^{-1})=s$.
\end{enumerate}

In the 1950's Weil found a way under which $\alpha$
and $\beta$ correspond to 
continuous characters $\alpha_{\lambda}$, $\beta_{\lambda}$ 
on $\Gal(\Qpbar/\Qp)$ 
with values in $\overline{E}_{\lambda}^*$ such that
\begin{enumerate} 
\item $\alpha_{\lambda}$ and $\beta_{\lambda}$ are unramified.
\item $\alpha_{\lambda}(\Frobp)=r$ and $\beta_{\lambda}(\Frobp)=s$. 
\end{enumerate}
One has that $\rholam=\alpha_{\lambda}\oplus\beta_{\lambda}$. 
See \cite{serre-tate}. [[Why see this?]]

Define a character $\Theta$ on the Borel subgroup 
$$B=\Bigl(\begin{matrix}*&*\\0&*\end{matrix}\Bigr)\subset\GL(2,\Qp)$$
by
$$\Theta\Bigl(\begin{matrix}x&y\\0&z\end{matrix}\Bigr)=\alpha(x)\beta(z)\in\C^*.$$
Then 
$$\pi_p=\Ind_B^{\GL(2,\Qp)}:=\C[\GL(2,\Qp)]\tensor_{\C[B]}\C.$$
We call this induced representation $\pi_p$ the 
unramified principal series representation associated
to $\alpha$ and $\beta$ and write $\pi_p=\PS(\alpha,\beta)$. 
People say $\pi_p$ is spherical in the sense that there is a vector
in the representation space invariant under the maximal compact
subgroup of $\GL(2,\Qp)$. [[Ribet was slightly unsure about the correct
definition of spherical.]] 
[[For some mysterious reason]] since $\pi_p=\PS(\alpha,\beta)$ it follows that
$\alpha$, $\beta$ and hence $\rho_{\lambda}|D_p$ is completely determined
by $\pi_p$. [[This is the point and i don't see this.]]

Next we consider the more difficult case when $p||N$ ($p$ divides
$N$ exactly). There are two cases to consider
\begin{itemize}
\item[a] $\varepsilon$ is ramified at $p$ ($p|\cond(\varepsilon)$)
\item[b] $\varepsilon$ is unramified at $p$ ($p\nd{}\cond(\varepsilon)$). 
\end{itemize}
%% THESE notes aren't finished yet!!


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 4/3/96

\section{More local properties of the $\rholam$.} 

Let $f$ be a newform of level $N$. Then $f$ corresponds to a representation
$\pi=\tensor\pi_v$. If $\lambda|\ell$ and $\ell\neq p$ then 
$\rholam|D_p$ corresponds to $\pi_p$ under the Langlands
correspondence. The details of this correspondence were figured out
by Philip Kutzko, but Carayol completed it in the exceptional
case (to be defined later). 
There are three cases to consider. 
\begin{itemize}
\item[a)] $p\nd N$ 
\item[b)] $p||N$
\item[c)] $p^2\mid N$
\end{itemize}
We considered the first two cases last time. The third case is
different because the same sort of analysis as we applied to the
first two cases no longer works in the sense that we no longer know what 
$\pi_p$ looks like. 

\subsection{Possibilities for $\pi_p$}

{\bfseries Case 1 (principal series)} 
In this case, $\pi_p=\PS(\alpha,\beta)$. 
Here $\alpha,\beta:\Qp^*\into\C^*$ are unramified characters. 
$\Qp^*$ corresponds to a dense subgroup of the abelian Galois group
of $\Qp$ under the correspondence elucidated in Serre's\index{Serre}
``Local Classfield Theory'' (in Cassels and Frohlich). 
$$\xymatrix{
{\Qp^*} \ar[r]\ar[d] & {\Gal(\Qbar_p/\Qp)^{\ab}}\ar[d]\\
 {\Z}\ar[r]& {\hat{\Z}=\Gal(\Fbar_p/\Fp)}
}$$
Under this correspondence $\alpha$ and $\beta$ correspond
to Galois representations $\alpha_{\lambda}$ and $\beta_{\lambda}$
and $\rholam|D_p\sim\alpha_{\lambda}\oplus\beta_{\lambda}$.

{\bfseries Case 2 (special)} In this case, $\pi_p$ is the {\em special}
automorphic representation corresponding to the Galois representation
$\kappa\tensor\st$ where $\st$ is the Steinberg representation which 
arises somehow from a split-multiplicative reduction elliptic curve
and $\kappa$ is a Dirichlet character.
In this case
$$\rholam|D_p= \kappa\tensor\Bigl(\begin{matrix}\chi_{\ell}&*\\0&1\end{matrix}\Bigr).$$ 

{\bfseries Case 3 (cuspidal)} Case 3 occurs when $\pi_p$ does not fall
into either of the previous cases. Such a $\pi_p$ is called cuspidal or
super-cuspidal. Some of these $\pi_p$ come from the following recipe.
Fix an algebraic closure $\Qpbar$ of $\Qp$. Let $K$ be a
quadratic extension of $\Qp$. Let $\psi:K^*\into\C^*$ be a Gr\"ossencharacter.
Then $\psi$ gives rise to a character
$$\psi_{\lambda}:\Gal(\Qpbar/K)\into\overline{E}_{\lambda}^*$$
which induces $\rholam|D_p$. That is,
$$\rholam|D_p=\Ind_{\Gal(\Qpbar/K)}^{\Gal(\Qpbar/\Qp)}\psi_{\lambda}:
\Gal(\Qpbar/\Qp)\into\GL(2,\overline{E}_{\lambda}).$$
This representation is irreducible if and only if $\psi$ is not invariant under
the canonical conjugation of $K/\Qp$. The pair $\psi$, $K$ gives
rise (via the construction of Jacquet-Langlands) to a representation
of $\pi_{\psi,K}$ of $\GL(2,\Qp)$. Those representations which do not come from
this recipe and which do not fall into case 1 or case 2 above are 
called {\em extraordinary}. They can only occur when $p\leq 2$. 

When can the various cases occur? 

Case 1) occurs, e.g, if $p\nd N$, and also if $p||N$ and 
$\varepsilon$ (the character of $f$) is ramified at $p$. 

Case 2) occurs if $p||N$ and $\varepsilon$ is unramified at $p$. 

%%% Put the stuff on twisting a modular form in here if it comes up later.

\subsection{The case $\ell=p$}
We consider $\rholam|D_p$ where $\lambda|p$ and $p=\ell$. 
Write $f=\sum a_nq^n$. The case when $\lambda\nd a_p$ is called the ordinary case.
This case is very similar to the case for an ordinary elliptic curve.
In other words, 
$$\rholam|D_p=\Bigl(\begin{matrix}\alpha&*\\0&\beta\end{matrix}\Bigr).$$
[[Ribet mentioned that there is a paper on this by  
Mazur and Wiles in the American Journal of Mathematics. Look the reference up.]]
An important point is that $\beta$ is unramified so it makes sense to
consider $\beta(\Frobp)=a_p\in{}E_{\lambda}^*$. Since
$\alpha\beta$ is the determinant, 
$\alpha\beta=\chi_p^{k-1}\varepsilon=\chi_p\varepsilon$
(after setting $k=2$ to fix ideas), this gives some 
description of what is going on. The obvious question to ask
is whether or not * is nontrivial. That is, 
is $\rholam|D_p$ semisimple or not? 

When $f$ has weight $2$, then $f$ gives rise to an abelian variety
$A=A_f$. Then $\rholam$ is defined by looking at the action of Galois
on the $\lambda$-adic
division points on $A$. If none of the $\lambda$ lying over $p$ divide $a_p$ then
$A$ is ordinary at $p$. A stronger statement is that the $p$-divisible group
$A[p^{\infty}]$ has good ordinary reduction. 

One simple case is when $f$ has CM. By this we mean that there is a 
character $\kappa\neq 1$ of order 2 such that 
$a_n=\kappa(n)a_n$ for all $n$ prime to $\cond(\kappa)$. [[This
is not a typo, I do not mean $\overline{a_n}=\kappa(n)a_n$. Coleman
said that $a_n=\kappa(n)a_n$ is just a funny way to say that half of
the $a_n$ are $0$.]] It is easy to prove that $f$ has CM if and only if the
$\rholam$ become abelian on some open subgroup of $\GalQ$ of finite index.
Ribet explains this in his article in \cite{ribet:galoisattached}. 
If $f$ has CM then since the representation $\rholam$ is almost 
abelian one can show that * is trivial. Ribet said he does
not know whether the converse is true.
Note that $f$ has CM if and only if $A_f/\overline{\Q}$ has CM. If all
$\lambda|p$ are ordinary (i.e., they do not divide $a_p$) and
if * is trivial for every $\rholam|D_p$ it is easy to show
using \cite{serre:ladic} that $A$ has CM. 

Next we will say something more about representations which appear
to be ordinary. Consider the situation in which $f$ has weight $2$
and $p$ exactly divides the level $N$ of $f$. Suppose furthermore
that the character $\varepsilon$ of $f$ is unramified at $p$. 
Then $\pi_p$ is a special representation. The $\lambda$-adic representations
for $\ell\neq p$ are (up to characters of finite order) like 
representations attached to some Tate curve\index{Tate curve}. The situation is
similar when $\ell=p$ since 
$$\rholam|D_p=\Bigl(\begin{matrix}\alpha&*\\0&\beta\end{matrix}\Bigr).$$
As in the case of a Tate curve $\alpha/\beta=\chi_p$. Up to a quadratic character we
know the situation since $\alpha\beta=\chi_p\varepsilon$. 
Also $\beta$ is still unramified and $\beta(\Frobp)=a_p$ is a unit. 
We know that $a_p^2=\varepsilon(p)$ is a root of unity. 
When $k=2$ the case of a spherical representation mimics what happens
for ordinary reduction. The upper right hand entry * is never trivial in 
this case [[because of something to do with extensions and Kummer theory]].

Ribet said he knows nothing about  the situation when $k>2$. If $p||N$ and
$\varepsilon$ is unramified at $p$
then $\pi_p$ is special so $\rholam$, $\ell\neq p$ are
again of the form $\bigl(\begin{smallmatrix}\alpha&*\\0&\beta\end{smallmatrix}\bigr)$.
So we still know everything up to a quadratic character. 
But if $\ell=p$ some characters are Hodge-Tate [[what does that mean?]]
so by a theorem of Faltings they can not be bizarre powers of the 
cyclotomic character. The multiplicative case like the ordinary case
is very special to the case $k=2$. Wiles uses this heavily in his proof.
If $k$ is arbitrary then $a_p^2=\varepsilon(p)p^{\frac{k}{2}-1}$
so $a_p$ is not a unit for $k>2$
so there is no invariant line.  So the representation is probably 
irreducible in the case $k>2$. [[Echos
of ``yeah'', ``strange'' and ``very strange'' are heard throughout the room.]]

\subsection{Tate curves}
Suppose $E/\Qp$ is an elliptic curve with multiplicative reduction
at $p$ and that $j\in\Qp$ is the $j$-invariant of $E$. Using a
formula which can be found in \cite[V]{silverman:aec2} one
finds $q=q(j)$ with $|q|<1$. The Tate curve is 
$E(\overline{\Q}_p)=\overline{\Q}_p/q^{\Z}$. The $p$ torsion
on the Tate curve is
$\{\zeta_p^a(q^{1/p})^b : 0\leq a,b\leq p-1\}$.
Galois acts by $\zeta_p\mapsto\zeta_p^a$ and 
$q^{1/p}\mapsto\zeta_p^a q^{1/p}$. Thus the associated Galois representation
is $\bigl(\begin{smallmatrix}\chi_p&*\\0&1\end{smallmatrix}\bigr)$.  
\chapter{Serre's Conjecture}\label{chap:serre}
{\sc This is version 0.2 of this section.  I am still
unsatisfied with the organization, level of detail, and 
coherence of the presentation.  A lot of work remains
to be done.  Some of Ken's lectures in Utah
will be integrated into this chapter as well.}

Let~$\ell$ be a prime number.
In this chapter we study certain mod~$\ell$ Galois
representations, by which we mean continuous homomorphisms~$\rho$
$$\xymatrix{\Gal(\Qbar/\Q) \ar[rr]^{\rho} && \GL(2,\F)}$$
where $\F$ is a finite field of characteristic $\ell$. 
Modular forms give rise to a large class of 
such representations.  
$$\xymatrix@=3.5pc{
   *++[F-,]{\txt{ newforms $f$ }}\ar@{~>}[rr] 
       && *++[F-,]{\txt{ mod $\ell$ representations $\rho$ }}}$$
The motiving question is: 
\begin{quote}Given a mod~$\ell$ Galois representation~$\rho$, 
which newforms~$f$ if any, of various weight and level, 
give rise to~$\rho$? 
\end{quote}
We will assume that~$\rho$ is irreducible.
It is nevertheless sometimes fruitful to consider the reducible
case (see~\cite{skinner-wiles:ordinary} and forthcoming work
of C. Skinner and A. Wiles).                    

Serre \cite{serre:conjectures} has given a very precise conjectural
answer to our motivating question.  The result, after much work
by many mathematicians, is that certain of Serre's conjectures
are valid in the sense that if~$\rho$ arises from a modular
form at all, then it arises from one having a level and weight as
predicted by Serre.  The main trends in the subject 
are ``raising'' and ``lowering.''

Our motivating question can also be viewed through the opposite 
optic\index{optic}. What is the most {\em bizarre} kind of modular
form that gives rise to~$\rho$?  A close study of the ramification
behavior of~$\rho$ allows one to at least obtain some sort of control 
over the possible weights and levels.  This viewpoint appears in
\cite{wiles:fermat}.

In this chapter whenever we speak of a {\em Galois representation}
the homomorphism is assumed to be continuous.   The reader is assumed
to be familiar with local fields, some representation theory,
and some facts about newforms and their characters. 

\section{The Family of $\lambda$-adic representations attached to 
 a newform}
First we briefly review the representations attached to a given newform. 
Let 
$$f=\sum_{n\geq 1} a_n q^n \in S_k(N,\eps)$$ 
be a newform of level $N$, weight $k$, and character $\eps$.
Set $K=\Q(\ldots,a_n,\ldots)$ and let $\O$ be the ring of integers
of $K$.  If $\lambda$ is a nonzero prime ideal of $\O$ we always let
$\ell$ be the prime of $\Z$ over which $\lambda$ lies,
so $\lambda\intersect\Z = (\ell)$.  
Let $K_{\lambda}$ denote the completion of $K$ at $\lambda$, thus
$K_{\lambda}$ is a finite extension of $\Q_\ell$. 
The newform~$f$ gives  rise to a system $(\rho_{f,\lambda})$
of $\lambda$-adic representations
$$\rho_{f,\lambda}:\Gal(\Qbar/\Q) \longrightarrow \GL(2,K_{\lambda})$$
one for each $\lambda$.
\begin{theorem}[Carayol, Deligne, Serre]
Let~$f$ be as above and~$\ell$ a prime.  
There exists a Galois representation 
$$\rho_{f,\ell}:\Gal(\Qbar/\Q)\longrightarrow\GL(2,K\tensor\Ql)$$
with the following property:
If $p\nmid \ell N$ is a prime, then $\rho_{f,\ell}$ is
unramified at $p$, and the image under $\rho_{f,\ell}$
of any Frobenius element for $p$ is a matrix with trace
$a_p$ and determinant $\eps(p) p^{k-1}$. 
\end{theorem}
The actual construction of $\rho_{f,\ell}$  won't be used in what follows. 
Since $K\tensor\Ql$ is a product $\prod_{\lambda} K_{\lambda}$ of
the various completions of $K$ at the primes $\lambda$ of $K$ lying 
over $\ell$, we have a decomposition
$$\GL(2,K\tensor\Ql) = \prod_{\lambda|\ell} \GL(2,K_{\lambda})$$
and projection onto $\GL(2,K_{\lambda})$ gives $\rho_{f,\lambda}$. 

By Lemma~\ref{lem:ovalues} $\rhoflam$ is equivalent to
a representation taking values in $\GL(2,\cO)$ where
$\cO$ is the ring of integers of $K$.  Since $\lambda$ is
a prime of $\cO$ reduction modulo $\lambda$ defines a map
$\GL(2,\cO)\ra\GL(2,\F)$ where $\F=\O/\lambda$ is the 
residue class field of $\lambda$, and we obtain
a mod $\ell$ Galois representation
$$\rhoflambar: \GalQ \lra \GL(2,\F).$$

\section{Serre's Conjecture A}
Serre \cite{serre:conjectures} 
conjectured that certain mod $\ell$ representations arise
from modular forms, and then gave a precise recipe 
for which type of modular form would give rise to the representation. 
We refer to the first part of his conjecture as ``Conjecture A'' and
to the second as ``Conjecture B''.  

Let $\rho:\GalQ\into\GL(2,\F)$ be a Galois representation 
with $\F$ a finite field. 
We say that $\rho$ {\em arises
from a modular form} or that $\rho$ is {\em modular}
if there is some newform $f=\sum a_n q^n$ and
some prime ideal $\lambda$ of $K=\Q(\ldots,a_n,\ldots)$
such that $\rho$ is isomorphic to $\rhobar_{f,\lambda}$
over $\Fbar$.  
$$\xymatrix{
{\cO/\lambda}\ar@{^(->}[r] & {\Fbar}\\
            & {\F}\ar@{-}[u]}$$
%Fix an algebraic closure $\Fbar$ of $\F$. Then there is an embedding
%of $\cO/\lambda$ into $\Fbar$ and a natural inclusion of $\F$ 
%into $\Fbar$.  
Recall that a Galois representation $\rho$ is {\em odd} if
$\det(\rho(c))=-1$ where $c\in\GalQ$ is a complex conjugation.
Galois representation arising from modular forms are always odd.
[More detail?]
\begin{conjecture}[Serre's Conjecture A]
Suppose 
    $$\rho:\GalQ\into\GL(2,\F)$$
is an odd irreducible (continuous) Galois representation 
with $\F$ a finite field.
Then $\rho$ arises from a modular form.
\end{conjecture}


\subsection{The Field of definition of $\rho$}
One difficulty is that $\rho$ sometimes takes values in a 
slightly smaller field than $\cO/\lambda$.
We illustrate this by way of an example.
Let $f$ be one of the two conjugate newforms of 
level $23$, weight $2$, and trivial character. 
Then 
$$ f = q + \alpha{}q^2 + (-2\alpha-1)q^3 + (-\alpha-1)q^4 + 2\alpha{}q^5 + \cdots $$
with $\alpha^2+\alpha-1=0$.
The coefficients of $f$ lie in $\cO=\Z[\alpha]=\Z[\frac{1+\sqrt{5}}{2}].$ 
Take $\lambda$ to be the unique prime of $\cO$ lying over $2$,
then $\cO/\lambda\isom\F_4$ and so $\rhoflambar$ is a homomorphism
to $\GL(2,\F_4)$. 
\begin{proposition}
If $p\neq 2$ then $a_p\in\Z[\sqrt{5}]$. 
\end{proposition}
\begin{proof}
We have $ f = f_1 + \alpha{} f_2$
with 
\begin{eqnarray*}
 f_1 &=& q -q^3 -q^4 + \cdots \\
 f_2 &=& q^2 -2q^3 -q^4 + 2q^5 + \cdots
\end{eqnarray*}
Because $S_2(\Gamma_0(23))$ has dimension two, it is
spanned by $f_1$ and $f_2$.  
Let $\eta(q)=q^{\frac{1}{24}}\prod_{n\geq 1}(1-q^n)$. 
By Proposition~\ref{prop:eta},
$g=(\eta(q)\eta(q^{23}))^2\in S_2(\Gamma_0(23))$. 
An explicit calculation shows that 
$g= q^2 - 2q^3 +\cdots$ so we must have $g=f_2$. 
Next observe that $g$ is a power series in $q^2$, modulo $2$:
\begin{eqnarray*}
   g &=& q^2\prod(1-q^n)^2(1-q^{23n})^2 \\
     &\con& q^2\prod(1-q^{2n})(1-q^{46n}) \pmod{2}\\
     &\con& q^2\prod(1+q^{2n}+ q^{46n}+q^{48n}) \pmod{2}
\end{eqnarray*}
Thus the coefficient in $f_2$ of $q^p$ with $p\neq 2$ prime is even
and the proposition follows.
\end{proof}
Thus those $a_p$ with $p\neq 2$  map 
modulo $\lambda$ to $\F_2\subset\F_4$,
and hence the traces and determinants of Frobenius, at primes where
Frobenius is defined, take values in $\F_2$.  
This is enough to imply that $\rhoflambar$ 
is isomorphic over $\Fbar$ to a representation
$\rho:\GalQ\ra\GL(2,\F_2)$.
Geometrically, $\GL(2,\F_2)\isom S_3$ and the
representation $\rho$ is one in which Galois 
acts via $S_3$ on three points of $X_0(23)$. 
%(An equation for $X_0(23)$ is 
%$y^2 = (x^3-x+1)(x^3-8x^2+3x-7).$)

Thus in general, if we start with $\rho$ and wish to see that 
$\rho$ satisfies Conjecture A, we may need to pass to an 
algebraic closure of $\F$. 
In our example, starting with $\rho:\GalQ\into\GL_2(\F_2)$ 
we say that ``$\rho$ is modular'' because
$\rho\isom\rholamfbar$, but keep in mind that 
this particular isomorphism 
only takes place over $\F_4$. 

At this point K. Buzzard\index{Buzzard}
comments, 
``Maybe there is some {\em better} modular form so that all of the 
$a_p$ actually lie in $\F_2$ and the associated representation 
is isomorphic to $\rho$.  That would be a stronger conjecture.'' 
Ribet responds that he has never thought about that question. 

\section{Serre's Conjecture B}
Serre's second conjecture asserts that $\rho$
arises from a modular form in a particular space.
Suppose 
    $$\rho:\GalQ\into\GL(2,\F)$$
is an odd irreducible Galois representation 
with $\F$ a finite field.
\begin{conjecture}[Serre's Conjecture B]
Suppose $\rho$ arises from some modular form. 
Then $\rho$ arises from a modular form 
of level $N(\rho)$, weight $k(\rho)$ and 
character $\eps(\rho)$.  
The exact recipe for $N(\rho)$ and $k(\rho)$ will be given
later.
\end{conjecture}
Conjecture B has largely been proven.
\begin{theorem} Suppose $\ell$ is odd. If the mod $\ell$ representation
$\rho$ is irreducible and modular, then $\rho$
arises from a newform $f$ of level $N(\rho)$
and weight $k(\rho)$.
\end{theorem}

\section{The Level}
The level $N(\rho)$ is a conductor of $\rho$,
essentially the {\em Artin conductor} except
that we omit the factor corresponding to $\ell$.
%If $\rho$ comes from a modular form then the ramification
%at $\ell$ doesn't really come from the level but comes
%from choosing the $\ell$-adic representation. 
The level is a product
   $$N(\rho) = \prod_{p\neq\ell}p^{e(p)}.$$ 
We now define the $e(p)$. 
Let $V$ be the representation space of $\rho$, so 
$V$ is a two dimensional $\F$-vector space and we 
view $\rho$ as a homomorphism 
     $$\rho:\GalQ\ra\Aut(V),$$
or equivalently view $V$ as an $\F[\GalQ]$-module. 
Let $K=\Qbar^{\ker(\rho)}$ be the field cut out
by $\rho$, it is a finite Galois extension of $\Q$
with Galois group which we call $G$. 
Choose a prime $\wp$ of $K$ lying over $p$ and let 
$$D = \{\sigma \in G : \sigma(\wp)\subset\wp\}$$
denote the decomposition group at $\wp$. 
Let $\cO$ be the ring of integers of $K$ and
recall that the higher ramification groups
$G_{-1}\supset G_0\supset G_1\supset G_2\supset \cdots $ are 
 $$G_i = \{ \sigma\in D : 
     \sigma\text{ acts trivially on }\cO/\wp^{i+1}\}.$$
Thus $G_{-1}=D$ and $G_0$ is the inertia group.
Each $G_i$ is a normal subgroup of $D$ because $G_i$ is
the kernel of $D \ra \Aut(\cO/\wp^{i+1})$.
Let 
$$V^{G_i} = \{v \in V : \sigma(v)=v\text{ for all }\sigma\in G_i\}.$$
\begin{lemma}
The subspace $V^{G_i}$ is invariant under $D$. 
\end{lemma}
\begin{proof}
Let $g\in D$, $h\in G_i$ and $v\in V^{G_i}$.  Since $G_i$ is normal in $D$,
there exists $h'\in G_i$ so that $g^{-1}hg = h'$.  Then
$h(gv)=gh'v=gv$ so $gv\in V^{G_i}$. 
\end{proof}
By \cite[\S9]{frohlich:local} that there is an integer $i$ so 
that $G_i=0$.  We can now define 
  $$e(p) = \sum_{i=0}^{\infty} 
      \frac{1}{[G_0:G_i]} \dim(V/V^{G_i}).$$ 
Thus $e(p)$ depends only on $\rho|I_p$ where $I_p=G_0$
is an inertia group at $p$.  In particular, if $\rho$ is
unramified at $p$ then all $G_i$ for $i\geq 0$ vanish and
$e(p)=0$. 
Separating out the term $\dim(V/V^{I_p})$ corresponding to $i=0$ 
allows us to write
      $$e(p)=\dim(V/V^{I_p})+\delta(p) \leq 2+\delta(p)$$
since $\dim V=2$.  The term $\delta(p)$ is called 
the {\em Swan conductor}.   By \cite[19.3]{serre:linear} $\delta(p)$
is an integer, hence $e(p)$ is an integer. 
We call $\rho$ {\em tamely ramified at $p$}
if all $G_i$ for $i>0$ vanish, in which case the Swan conductor
is $0$.

Suppose $\rho\isom\rhoflambar$ (over $\Fbar$) for some newform
$f$ of level $N$.  There is a relationship  between $e(p)$ 
and something involving only $f$.
Let $V_{\lambda}$ be the representation space of $\rhoflam$, 
so $V_{\lambda}$ is a vector space over an extension of $\Ql$. 
It turns out that
$$\ord_p(N)=\dim(V_{\lambda}/V_{\lambda}^{I_p})+\delta(p).$$
Thus 
   $$\ord_p(N)=e(p)+\text{ error term}$$
where the error term is 
   $\dim(V^{I_p})-\dim(V_{\lambda}^{I_p})\leq 2$. 
The point is that more can become invariant upon  reducing 
modulo $\lambda$.  Thus if $f$ gives rise to 
$\rho$ then the power of $p$ in the
level $N$ of $f$ is constrained as it is given by a 
certain formula only depending on $e(p)$ and an error 
term which has magnitude at most $2$. 

As we will see, the weight $k(\rho)$ depends only 
on $\rho|I_{\ell}$.  Thus $k(\rho)$ can be viewed as
an analogue of $e(\ell)$.

\subsection{Remark on the case $N(\rho)=1$}
One consequence of Conjecture B is that every modular 
mod $\ell$ representation $\rho$ must come from a newform $f$ of 
level prime to $\ell$.  Suppose that $f$ is a modular form 
of level $\ell$.   Consider the corresponding 
mod $\ell$ representation.
It is unramified outside $\ell$ so $N(\ell)=1$. The conjecture then
implies that this mod $\ell$ representation 
comes from a level $1$ modular
form, i.e., a modular form on $\SL_2(\Z)$, 
of possibly higher weight.  This is a classical result. 

For the rest of this subsection we assume that $\ell\geq 11$.
There is a relationship between mod $\ell$ forms on $\SL_2(\Z)$ 
of weight $\ell+1$ and mod $\ell$ forms on $\Gamma_0(\ell)$ of weight $2$. 
The dimensions of each of these spaces are the same over
$\Fl$ or over $\C$, i.e., 
$$\dim_{\Fl}S_2(\Gamma_0(\ell);\Fl) = \dim_\C S_2(\Gamma_0(\ell);\C).$$
$$\dim_{\Fl}S_{\ell+1}(\SL_2(\Z);\Fl) = \dim_\C S_{\ell+1}(\SL_2(\Z);\C).$$
\comment{Recall the dimension formulas.  By \cite[VII.3.2]{serre:arithmetic}, 
$$\dim S_k(\SL_2(\Z)) = \begin{cases}
   \lfloor k/6\rfloor-1  & \text{if }k\con 1\pmod{6},\quad k\geq 6\\
   \lfloor k/6\rfloor    & \text{if }k\not\con 1\pmod{6}, \quad k\geq 0.
\end{cases}$$
In Chapter~\ref{chap:genus} we computed the genus of $X_0(\ell)$. 
Write $\ell=12a+b$ with $0\leq b\leq 11$. Then
\begin{center}
\begin{tabular}{|c|cccc|}\hline
  $b$ & $1$ & $5$ & $7$ & $11$ \\\hline
$\dim S_2(\Gamma_0(\ell))$ & $a-1$ & $a$ & $a$ & $a+1$\\\hline
\end{tabular}
\end{center}}
We now describe a map
  $$F:S_2(\Gamma_0(\ell);\Fl) \longrightarrow S_{\ell+1}(\SL_2(\Z);\Fl).$$
The weight $k$ Eisenstein series
$$E_{k} = 1 -\frac{2k}{B_k}
     \sum_{n=1}^{\infty} \sigma_{k-1}(n)q^n$$
is a modular form for $\SL_2(\Z)$.  Here the Bernoulli numbers 
$B_k$ are defined by 
$$\frac{t}{e^t-1} = \sum_{k=0}^{\infty} B_k\frac{t^k}{k!},$$
so $B_0 = 1,\, B_1=-\frac{1}{2}, \, B_2=\frac{1}{12}, \,
B_3=-\frac{1}{720},\ldots$. 
\begin{proposition}
If $\ell\geq 5$, then 
$$E_{\ell-1} \con 1 \pmod{\ell}.$$
\end{proposition}
\begin{proof}
We must check that $\ell\mid \frac{2(\ell-1)}{B_{\ell-1}}$,
or equivalently that $\ell\mid \frac{1}{B_{\ell-1}}$. 
Set $n=\ell-1$, $p=\ell$ and apply \cite[X.2.2]{lang:modular}.
\end{proof}

Suppose $\overline{f}\in S_2(\Gamma_0(\ell);\Fl)$ is the reduction
of $f\in{} S_2(\Gamma_0(\ell);\Fl)$. 
Multiplication by $E_{\ell-1}$ gives a mod $\ell$ 
form $\fbar\cdot E_{\ell-1}$ of weight $\ell+1$ on $\Gamma_0(\ell)$. 
%Let $\mathcal{R}$ be coset 
%representatives for $\Gamma_0(\ell)$ in $\SL_2(\Z)$.
%Then 
%  $$F(\overline{f}) = \tr(\overline{f}\cdot E_{\ell-1})
%    = \sum_{\gamma\in\mathcal{R}} (\fbar\cdot E_{\ell-1})|[\gamma]_{\ell-1}
%         \in S_{\ell+1}(\SL_2(\Z);\Fl).$$
We have 
  $$F(\overline{f}) = \tr(\overline{f}\cdot E_{\ell-1})
        \in S_{\ell+1}(\SL_2(\Z);\Fl)$$
where $\tr$ is induced by $X_0(\ell)\ra X_0(1)$.
The map $F$ was discovered by Serre \cite{MR48:8389}. 
That $F$ has the properties necessary to deduce the prime level
case of Serre's Conjecture B was proved by explicit computation
in the Berkeley Ph.D.  thesis of C. Queen \cite{queen}.
Katz believes that it is easy to prove the formula from the right
magical moduli point of view, but neither author has seen this.
The first author gave a concrete proof for $\ell>2$ in \cite{ribet:report}. 
It would be nice if someone would construct a clear proof for the
case $\ell=2$.

\subsection{Remark on the proof of Conjecture B}
We now give a very brief outline of the 
proof of Conjecture B when $\ell>2$. 
Start with a representation $\rho$ which comes from
some (possibly terrible) newform $f$ of level $N(f)$ and weight $k(f)$. \\
\par\noindent{\em Step 1.} Using a concrete argument replace 
$f$ by another newform giving rise to $\rho$ so 
that $\ell\nmid N(f)$.\\
\par\noindent{\em Step 2.} Compare $N(\rho)$ and $N(f)$. These are two prime
to $\ell$ numbers. What if $p\mid \frac{N(f)}{N(\rho)}$? Carayol
separated this into several cases. In each case replace $f$ 
by a better form so that the ratio has a smaller power of 
$p$ in it. This is level lowering. 
Eventually we get to the case $N(\rho)=N(f)$. \\
\par\noindent{\em Step 3.} Using a paper of Edixhoven \cite{edixhoven:weight} 
one shows that $f$ can be replaced with a another form of the same
level so that the weight $k$ is equal to $k(\rho)$. \\

\section{The Weight}
\subsection{The Weight modulo $\ell-1$}
We first give some background which motivates
Serre's numerical recipe for the weight.
We start with a newform $f$ of low weight $k$ and consider the
behavior of the representation $\rho=\rhoflambar|I_{\ell}$, where
$I_{\ell}$ is an inertia group at $\ell$.  Assume that we
are in the following situation:
\begin{itemize}
\item $N=N(f)$ is prime to $\ell$,
\item $2\leq k\leq \ell+1$. 
\end{itemize}
There are other cases to consider but we consider this one first.
Let $\eps$ be the character of $f$ and recall that for $p\nmid \ell N$
$$\det(\rho_{f,\ell}(\Frobp)) = \eps(p)p^{k-1}.$$  
The mod $\ell$ cyclotomic character $\chi_{\ell}:\GalQ\ra\Fl^*$ is the
homomorphism sending $\Frobp$ to $p\in\Fl^*$. Thus
$$\det(\rho) = \eps\chi_{\ell}^{k-1}.$$ 
Since $\eps$ is a Dirichlet character mod $N$ and $\ell\nmid N$,
$\eps|I_{\ell}=1$ and so
   $$\det(\rho|I_{\ell})=\chi_{\ell}^{k-1}.$$
We see immediately that $\det(\rho|I_{\ell})$ determines $k$ modulo $\ell-1$. 
Since $2\equiv\ell+1\pmod{\ell-1}$, this still doesn't distinguish
between $2$ and $\ell+1$. 

\subsection{Tameness at $\ell$}
Let
      $$\rho:\GalQ \lra \GL(2,\F_{\ell^\nu})$$   
be a modular mod $\ell$ Galois representation. 
Let $D = D_{\ell}\subset\GalQ$ be a decomposition group at $\ell$. 
Let $\sigma$ be the semisimplification of $\rho|D$. 
Thus $\sigma$ is either a direct sum of two 
characters or $\sigma=\rho|D$ depending on whether 
or not $\rho|D$ is irreducible. 
By \cite[8.1]{frohlich:local} the ramification 
group $P=G_1$ is the unique Sylow $\ell$-subgroup
of $I_{\ell} = G_0$.  
\begin{lemma} The semisimplification $\sigma$ of $\rho$ is tame, i.e., 
$\sigma|P = 0$
where $P$ is the Sylow $\ell$-subgroup of the inertia
group $I_{\ell}$. 
\end{lemma} 
\begin{proof}
Since $I_{\ell}$ is normal in $D$ and any automorphism of $I_{\ell}$
sends $P$ to some Sylow $\ell$-subgroup and $P$ is the only such,
it follows that $P$ is normal in $D$. 
Let $W=\F_{\ell^{\nu}}\times\F_{\ell^{\nu}}$ be the representation
space of $\sigma$. Then
$$W^P=\{w\in W : \sigma(\tau)w = w \quad\mbox{\rm for all}
                                   \quad\! \tau\in P\}$$
is a subspace of $W$ invariant under the action of $D$.
For this let $\alpha\in D$ and suppose $w\in W^P$. Since $P$
is normal in $D$, $\alpha^{-1}\tau\alpha=\tau'$ for some $\tau'\in P$. 
Therefore 
$$\sigma(\alpha)^{-1}\sigma(\tau)\sigma(\alpha)w = \sigma(\tau') w = w$$
so $\sigma(\tau)\sigma(\alpha)w = \sigma(\alpha)w$ hence
$\sigma(\alpha)w\in W^P$. 

But $W^P\neq 0$. To see this write $W$ as a disjoint union of its orbits
under the action of $P$. Since $P$ is an $\ell$-Sylow group and $W$ is
finite we see that the size of each orbit is either $1$ or a positive
power of $\ell$. Now $\{0\}$ is a singleton orbit, $W$ has $\ell$-power
order, and all non-singleton orbits have order a positive power of $\ell$ 
so there must be at least $\ell-1$ other singleton orbits. 
Each of these other singleton
orbits gives a nonzero element of $W^P$. 

If $W^P=W$ then $P$ acts trivially so we are done. If
$W^P\neq W$, then since $W^P$ is nonzero it
is a one dimensional subspace invariant under $D$, so 
by semisimplicity $\sigma$ is diagonal.
Let $\tau\in P$,
then $\tau$ has order $\ell^n$ for some $n$. Write 
$$\sigma(\tau)=\left(\begin{array}{cc}\alpha&0\\0&\beta\end{array}\right),$$
then $\alpha^{\ell^n}=\beta^{\ell^n}=1$. Since 
$\alpha, \beta\in\F_{\ell^{\nu}}$ they have order 
dividing $|\F_{\ell^{\nu}}^*| = \ell^{\nu}-1$.
But $\gcd(\ell^{\nu}-1,\ell^n)=1$ from which it 
follows that $\alpha=\beta=1$.  Thus $P=\{1\}$ and again
$P$ acts trivially, as claimed. 
\end{proof}

\subsection{Fundamental characters of the tame extension}

The lemma implies $\sigma|I_{\ell}$ factors through the tame quotient 
$I_t=I_{\ell}/P$.  We now describe certain characters of
$I_t$ more explicitly.   Denote by 
$\Ql^{\tame}$ the maximal tamely ramified extension of 
$\Ql$, it is the fixed field of $P$. 
Let $K=\Ql^{\ur}$ be the maximal unramified extension, i.e.,
the fixed field of the inertia group $I_{\ell}$. 
By Galois theory
    $$I_t=\mbox{\rm Gal}(\Ql^{\tame}/\Ql^{\ur}).$$
For each positive integer $n$ coprime to $\ell$ there is a 
tower of Galois extensions
%DECOMMENT
$$\xymatrix@=1.2pc{
{\Ql^{\tame}}\ar@{-}[d] \ar@{-}@/_3pc/[ddd]|*+{I_t}\\
{K(\protect{\sqrt[n]{\ell}})}\ar@{-}[dd]\ar@{-}@/^2pc/[dd]|*+{\bmu_n(K)}\\
\\
{K=\Ql^{\ur}}\ar@{-}[d]\\
{\Ql}}$$
Since $\Q(\zeta_n)/\Q$ is unramified at $\ell$
the $n$th roots of $1$ are contained in $K$ so by
Kummer theory
 $$\Gal(K(\sqrt[n]{\ell})/K)\isom \bmu_n(K)$$
where $\bmu_n(K)$ denotes the group of $n$th roots of unity in $K$. 
Thus for each $n$ prime to $\ell$ we obtain a map
$I_t\rightarrow\bmu_n(K)$. 
They are compatible so upon passing to the limit we obtain a map
$$I_t\lra \varprojlim \bmu_n(K)
        =\prod_{r\neq \ell}\varprojlim\bmu_{r^a}(K)
        =\prod_{r\neq \ell}\Z_r(1).$$
In fact \cite[8, Corollary 3]{frohlich:local} the above
maps are isomorphisms. 
Viewed more cleverly mod $\ell$ we obtain a map
$$I_t\lra \varprojlim \bmu_n(\Flbar)
      = \varprojlim \F_{\ell^i}^*.$$
Thus for each $i$ we have a map
       $$I_t\rightarrow\F_{\ell^i}^*.$$
which is called the {\em fundamental character of level $i$}. 
The construction of this character on $I_t$ 
is somewhat unnatural because we had to choose an embedding
$\F_{\ell^i}\hookrightarrow \Flbar$. Instead Serre 
begins with a  ``disembodied'' field $F$ of order $\ell^i$. 
There are $i$ different maps $\F_{\ell^i}\rightarrow F$ corresponding to the
$i$ automorphisms of $\F_{\ell^i}$. Restricting these maps to $\F_{\ell^i}^*$
and composing with $I_t\rightarrow\F_{\ell^i}^*$
gives the $i$ fundamental characters of level $i$. 
The unique fundamental character of level $1$ is
the mod $\ell$ cyclotomic character $\chi_{\ell}$.


\subsection{The Pair of characters associated to $\rho$}
Recall that we have a representation $\rho$ whose semisimplification
gives a representation which we 
denote by $\sigma$:
   $$\sigma:I_t\lra \GL(2,\F_{\ell^{\nu}}).$$
Since $\sigma(I_t)$ is a finite abelian group and
the elements of $I_t$ have order prime to $\ell$,
this representation is semisimple and can be
diagonalized upon passing to $\Flbar$.  In fact,
since the characteristic polynomials all have degree
two, $\sigma$ can be diagonalized over $\F_{\ell^{2\nu}}$. 
Thus $\sigma$ corresponds to a pair of characters 
$$\alpha,\,\beta:I_t\lra\F_{\ell^{2\nu}}^*.$$

These characters have some stability properties since $\sigma$ is 
the restriction of a homomorphism from the full decomposition
group. Consider the tower of fields 
$$\xymatrix@=1.2pc{
{K(\sqrt[n]{\ell})}\ar@{-}[d]\\
{K=\Ql^{\ur}}\ar@{-}[d]\\
{\Ql}}$$

Let $G=\Gal(K(\sqrt[n]{\ell})/\Ql)$.  Recall that
$\Gal(K(\sqrt[n]{\ell})/K)\isom\bmu_n(K)$ and 
$\Gal(K/\Ql)$ is topologically generated by $\Frobl$. 
If $h\in\bmu_n(K)$ and $g\in G$ restricts to $\Frobl$ 
then we have the conjugation formula: 
   $$ghg^{-1}=h^\ell.$$ 
Applying this to our representation $\sigma$
with $h\in I_t$ we find that 
$$\sigma(ghg^{-1})=\sigma(h^\ell)=\sigma(h)^\ell$$  
so
$$\sigma(g)\sigma(h)\sigma(g^{-1})=\sigma(ghg^{-1})=\sigma(h)^\ell.$$
The point is that the representation 
$h\mapsto\sigma(h)^\ell$ is equivalent to 
$h\mapsto\sigma(h)$ via conjugation by $\sigma(g)$. 
We conclude that the pair of characters 
$\{\alpha,\,\beta\}$ is stable under $\ell$-th powering,
i.e., as a set
 $$\{\alpha,\,\beta\}=\{\alpha^\ell,\,\beta^\ell\}.$$

What does this mean?  There are two possibilities:
\begin{itemize}
\item {\em Level 1:} $\alpha^\ell=\alpha$ and $\beta^\ell=\beta$. 
\item {\em Level 2:} $\alpha^{\ell}=\beta$ and $\beta^\ell=\alpha$, 
but $\alpha\neq \beta$. 
\end{itemize}
Note that in the level 1 case, $\alpha$ and $\beta$ take 
values in $\Fln^*$.

\subsection{Recipe for the weight}
We will play a carnival game, ``guess your weight.'' 
First we consider the level 2 case. 
Our strategy is to express  $\alpha$ and $\beta$ 
in terms of the two fundamental characters of level 2.
We then observe how the characters associated to a newform
are expressed in terms of the two fundamental characters. 

The remainder of this chapter is devoted to motivating
the following definition.
\begin{defn}
Let $\rho$ and $\sigma$ be as above.  
Let $\psi$, $\psi'$ be the two fundamental characters of level $2$
and $\chi$ the fundamental character of level $1$ (the cyclotomic
character).
Serre's recipe for $k(\rho)$ is as follows.
\begin{enumerate}
\item Suppose that $\alpha$ and $\beta$ are of level 2.
We have 
  $$\rho|I_{\ell} = \mtwo{\alpha}{0}{0}{\beta}.$$
After interchanging $\alpha$ and $\beta$ if necessary, we
have (uniquely) $\alpha=\psi^{r+\ell q}=\psi^r(\psi')^q$ and
$\beta=(\psi')^r\psi^q$ with $0\leq r<q\leq \ell-1$.
We set $k(\rho)=1+\ell r+q$. 
\item Suppose that $\alpha$ and $\beta$ are of level 1.
We have $$\rho|I_{\ell}=\mtwo{\chi^r}{*}{0}{\chi^q}.$$
\begin{enumerate}
\item If $*=0$, normalize and reorder $r,q$ so 
that $0\leq r\leq q\leq \ell-2$.  We set $k(\rho)=1+\ell r + q$. 
\item If $*\neq 0$, normalize so that
    $0\leq q\leq \ell-2$ and $1\leq r\leq\ell-1$. 
We set $a=\min(r,q)$, $b=\max(r,q)$.  If $\chi^{r-q}=\chi$
and $\rho\tensor\chi^{-q}$ is not finite at $\ell$ then we set
$k(\rho)=1+\ell a+ b + \ell - 1$; otherwise
we set $k(\rho)=1+\ell a+ b$. 
\end{enumerate}
\end{enumerate}
\end{defn}

\subsection{The World's first view of fundamental characters}
First some background.
Suppose $E/\Q$ is an elliptic curve and $\ell$ is a prime
(2 is allowed). Assume $E$ has good {\em supersingular}
reduction at $\ell$, so $\tilde{E}(\Flbar)[\ell]=\{0\}$.  
Then there is a Galois representation
$$\rho:\GalQ\lra \Aut(E[\ell])$$
which, {\em a priori}, may or may not be irreducible. 
As above, $\rho$ gives rise to two characters 
$$\alpha,\,\beta\, :\,\ I_t\rightarrow\F_{\ell^2}^*.$$
Serre (see \cite{velu:groupes})
proved that $\alpha, \beta$ are the two fundamental characters
of level $2$ and that $I_t$ acts irreducibly over $\Fl$. [[Is
this right?]]
He also observed that there is a map
  $$I_t\rightarrow\F^*_{\ell^2}\subset\mbox{\rm GL}(2,\Fl)$$
where $\F^*_{\ell^2}$ sits inside $\mbox{\rm GL}(2,\Fl)$ via
the action of the multiplicative group of a field on
itself after choice of a basis, and the
map to $\F^*_{\ell^2}$ is through one of the two
fundamental characters of level $2$. 

\subsection{Fontaine's theorem}
Serre next asked Fontaine to identify the characters
$\alpha$ and $\beta$ attached to more general modular
representations.  Fontaine's answer was published in 
\cite{edixhoven:weight}.
Suppose $f=\sum a_n q^n$ is a 
newform of weight $k$ such that $2\leq k\leq \ell$ 
and the level $N(f)$ of $f$ is prime to $\ell$. 
Let $\rho=\rhoflambar$ where $\lambda$ is a prime of 
$\Q(\ldots,a_n,\ldots)$ lying over $\ell$.
Assume we are in the {\em supersingular} case, i.e., 
      $$a_\ell\equiv 0 \mod \lambda.$$
Semisimplifying as before gives a pair of characters
 $$\alpha,\, \beta:I_t\lra \Fltn^*.$$
Let $\psi,\, \psi':I_t\ra \F_{\ell^2}^*$ 
be the two fundamental characters of level $2$
so $\psi=(\psi')^\ell$ and $\psi'=\psi^\ell$. 
\begin{theorem}\label{edixfontaine}
With the above notation and hypothesis,
the characters $\alpha, \beta$ arising by 
semisimplifying and restricting  $\rhoflambar$ satisfy
     $$\{\alpha,\,\beta\} = \{\psi^{k-1},\,(\psi')^{k-1}\}.$$
\end{theorem}
\comment{Edixhoven's method involves reducing 
from weight $k$ to weight $2$.  Given a modular 
form modulo $\ell$ on $\Gamma_1(N)$ of
weight $k$ and character $\eps$ he shows that 
it is enough to look at a corresponding modular form 
on $\Gamma_1(N\ell)$ of weight $2$ and character 
$\eps\omega^{k-2}$ where $\omega$ is a Teichm\"uller 
character on $(\Z/\ell\Z)^*$. }

\subsection{Guessing the weight (level 2 case)}
We now try to guess the weight in the level 2 case.
We begin with a representation $\rho$ whose semisimplification
is a representation $\sigma$, which in turn gives
rise to a pair of level 2 characters 
$$\{\alpha,\,\,\beta\}=\{\psi^a,\,\, (\psi')^a=\psi^{\ell{}a}\}.$$
Since $\psi$ takes values in $\F_{\ell^2}^*$, we may think 
of $a$ as a number modulo $\ell^2-1$.  Note also
that the pair is unchanged upon replacing $a$ by $\ell{}a$. 
The condition that we are not in 
level 1 is that $a$ is not divisible by
$\ell+1$ since 
  $$\psi\psi'=\psi^{\ell+1}:I_t\rightarrow\Fl^*$$ 
is the unique fundamental character of level 1,
i.e., the mod $\ell$ cyclotomic character.

Normalize $a$ so that $0\leq a<\ell^2-1$ and write $a=q\ell+r$. 
What are the possible values for $q$ and $r$?
By the Euclidean algorithm $0\leq r\leq \ell-1$ and $0\leq q\leq \ell-1$. 
If $r=q$ then $a$ is a multiple of $\ell+1$, so $r\neq q$. 
If $r>q$, multiply the above relation by $\ell$ to obtain
$a\ell=q\ell^2+r\ell$.  But we are working mod $\ell^2-1$ so 
this becomes  $a \ell = q+r\ell\pmod{\ell^2-1}$.  
Thus if we replace $a$ by $a\ell$ then the roles of $q$ and $r$ are
swapped in the Euclidean division.  
Thus we can {\em assume} that $0\leq r<q\leq \ell-1$. 
Now
$$\alpha = \psi^a=\psi^{q\ell+r}=(\psi')^q\psi^r
       =(\psi\psi')^r(\psi')^{q-r},$$
so
$$\{\alpha,\,\beta\}
     =\{(\psi\psi')^r(\psi')^{q-r},\, (\psi\psi')^r\psi^{q-r}\}.$$  
Since $\psi\psi'=\chi$ is the mod $\ell$ cyclotomic character,
we can view $\{\alpha,\,\beta\}$ as a pair of characters
$(\psi')^{q-r}$ and $\psi^{q-r}$ which has been multiplied, as a 
pair, by $\chi^r$. 

What weight do we guess if $r=0$? In this case
$$\{\alpha,\,\beta\}=\{(\psi')^{k-1},\,\psi^{k-1}\}$$
where $k=1+q$. So in analogy with Theorem~\ref{edixfontaine} 
we guess that 
$$k(\rho)=1+q\qquad\qquad\text{($r=0$, supersingular case)}.$$

What do we guess in general? Suppose $f=\sum a_n q^n$ is a
modular form thought of mod $\ell$ which 
gives rise to $\rho$, and that $\ell$ does not
divide the level of $f$. 
We might as well ask what modular form gives 
rise to $\rho\otimes\chi$. 
In \cite{katz:antwerp601} we learn that
$$\theta f=\sum n a_n q^n \pmod{\ell}$$
is a mod $\ell$ eigenform, and it evidently 
gives rise to $\rho\otimes\chi$.
Furthermore, if $k$ is the weight of $f$, 
then $\theta f$ has weight $k+\ell+1$. 
Since 
$$\{\alpha,\,\beta\} = \{\psi^{q-r},\, (\psi')^{q-r}\}\cdot\chi^r$$
we guess that
$$k(\rho) = q-r+1+(\ell+1)r=1+\ell{}r+q\qquad\text{(supersingular case)}$$

But be careful! the {\em minimal} 
weight $k$ does not have to go up by $\ell-1$, though
it usually does.
This is described by the theory 
of $\theta$-cycles which we will review shortly.

\subsection{$\theta$-cycles}
The theory of the $\theta$ operator was first developed 
by Serre and  Swinnerton--Dyer and then later jazzed 
up by Katz in \cite{katz:antwerp601}. 
There is  a notion of modular forms mod $\ell$ 
and of $q$-expansion which gives a map
$$\alpha:\bigoplus_{k\geq 0}
   M_k(\Gamma_1(N);\Fl)\lra\Fl[[q]].$$
This map is not injective. The kernel is the ideal
generated by $A-1$ where $A$ is the Hasse invariant.

Suppose $f\in\Fl[[q]]$ is in the image of $\alpha$. 
If $f\neq  0$ let $w(f)$ denote the smallest $k$ so that $f$
comes from some $M_k$. If $f$ does not coming 
from any single $M_k$ do not define $w(f)$. 
Define an operator $\theta$ on $\F_\ell[[q]]$ by
$$\theta(\sum a_n q^n)=q\frac{d}{dq}(\sum a_n q^n)=\sum n a_n q^n.$$
Serre and Swinnerton-Dyer showed that $\theta$
preserves the image of $\alpha$. 
\begin{theorem}\label{theta}
Suppose $f\neq 0$ is a mod $\ell$ modular form as above. If
$\ell \nmid w(f)$ 
then $w(\theta f)=w(f)+\ell+1$. 
%If $w(f)\equiv 0\mod \ell$ then $w(\theta f) = w(f) + 2 - i(\ell-1)$
%for some $i\geq 0$. 
\end{theorem}
Associated to $f$ we have a sequence of nonnegative integers
$$w(f),\, w(\theta f),\, w(\theta^2 f),\, \ldots$$
Fermat's little theorem implies that this sequence 
is periodic because $\theta^\ell f=\theta f$ 
and so $w(\theta^{\ell} f) = w(\theta f)$. 
We thus call the cyclic sequence
  $w( f), \, w(\theta f), \, w(\theta^2 f), \ldots$
the {\em $\theta$-cycle} of $f$.
Tate asked:  
\begin{quote}
     What are the possible $\theta$-cycles?
\end{quote}
This question was answered in \cite{jochnowitz:local} 
and \cite{edixhoven:weight}.
We now discuss the answer in a special case. 

Let $f$ be an eigenform such that $2\leq k=w(f) \leq \ell$
and $f$ is supersingular, i.e.,  $a_\ell(f)=0$.  
Since $f$ is an eigenform
the $a_n$ are multiplicative 
($a_{nm}=a_n a_m$ for $(n,m)=1$) and
if $\eps$ denotes the character of $f$ then
\begin{eqnarray*}
a_{\ell^i} 
   &=& a_{\ell^{i-1}}\cdot a_{\ell} - \eps(\ell)\ell^{k-1} a_{\ell-2}\\
   &=& a_{\ell^{i-1}}\cdot a_{\ell} = 0
\end{eqnarray*}
since we are working in characteristic $\ell$ and $k\geq 2$.
Thus $a_n(f)=0$ whenever $\ell\mid{}n$ and so
$\theta^{\ell-1}f=f$ hence $w(\theta^{\ell-1}f)=w(f)$. 

If we apply $\theta$ successively to $f$ what happens?
Before proceeding we remark that
it can be proved that there is at most 
one drop in the sequence
  $$k=w( f), \, w(\theta f), \, w(\theta^2 f), \ldots, w(\theta^{\ell-2}f).$$
First suppose $k=2$.  The $\theta$-cycle must be
$$2,\, 2+(\ell+1),\, 2+2(\ell+1),\, \ldots,\, 2+(\ell-2)(\ell+1).$$ 
This is because, by Theorem~\ref{theta}, applying 
$\theta$ raises the weight by $\ell+1$ so long 
as the weight is not a multiple of $\ell$. 
Only the last term in the above sequence is divisible by
$\ell$. There are $\ell-1$ terms so this is the 
full $\theta$-cycle.

Next suppose $k=\ell$. The $\theta$-cycle is
$$\ell,\, 3,\, 3+(\ell+1),\,\ldots,\,3+(\ell+1)(\ell-3).$$
The last term is divisible by $\ell$, no earlier term after the
first is, and there are $\ell-1$ terms so this is 
the full $\theta$-cycle.  We know that the second term
must be $3$ since it is the only number so that 
the $\theta$-cycle works out right, i.e., so that 
the $(\ell-1)$st term is divisible
by $\ell$ but no earlier term except the first is. 
For example, if we would have tried $2$ instead
of $3$ we would have obtained the sequence
$$\ell,\, 2,\, 2+(\ell+1),\, \ldots,\, 
     2+(\ell+1)(\ell-3),\, 2+(\ell+1)(\ell-2).$$
This sequence has one too many terms. 

Now we consider the remaining values of $k$: $2<k<\ell$. 
The $\theta$-cycle is
$$k,\, k+(\ell+1),\, \ldots,\, k+(\ell+1)(\ell-k),\,
     k',\, k'+\ell+1,\, \ldots,\, k'+(\ell+1)(k-3).$$
The first $\ell-k+1$ terms of the sequence are obtained by
adding $\ell+1$ successively until obtaining a term $k+(\ell+1)(\ell-k)$ 
which is divisible by $\ell$.   Applying $\theta$ to a form of weight
$k+(\ell+1)(\ell-k)$ causes the weight to drop to some $k'$. 
How can we guess $k'$? It must be such that $k'+(\ell+1)(k-3)$
is divisible by $\ell$. Thus the correct answer is 
        $$k'=\ell+3-k.$$ 

\subsection{Edixhoven's paper}
Suppose that $\rho$ is an irreducible 
mod $\ell$ representation so that the level
of the characters $\alpha,\beta$ associated to the semisimplification
of $\rho$ are level $2$. 
To avoid problems in a certain exceptional case assume $\ell\geq 3$. 
Edixhoven \cite{edixhoven:weight} proved that if $\rho$
arises from an eigenform  in $S_k(\Gamma_1(N))$ 
with $(N,\ell)=1$, then $\rho$ arises from an 
eigenform in $S_{k(\rho)}(\Gamma_1(N))$. 
What are the elements of the proof?
\begin{enumerate}
\item The behavior of $\rho|{I_\ell}$ when $\rho$ arises from
an $f$ with $2\leq w(f)\leq \ell+1$.
\item The fact that every modular representation $\rho$
    has the form $\rhoflambar\otimes\chi^i$ 
   where $i\in\Z/(\ell-1)\Z$, and $2\leq w(f)\leq \ell+1$.
\end{enumerate}
Serre knew the second element but never published a proof.  How did Serre 
talk about his result before Edixhoven's paper?
The eigenform $f$ correponds to a system of eigenvalues in
$\Flbar$ of the Hecke operators $T_r$, $r\nmid \ell N$.
Eigenforms of weight at most $\ell+1$ give, up to twist, 
all systems of Hecke eigenvalues. A possible proof of this uses
the construction of $\rho_f$ in terms of 
certain \'{e}tale cohomology groups.

\section{The Character}
Let 
 $$\rho: G_\Q=\GalQ \lra \GL(2,\Fln)$$
be a Galois representation.
Assume that $\rho$ is irreducible, modular
$\rho\isom\rholamfbar$, and $\ell>2$. 
The {\em degree} of a character $\vphi:(\Z/N\Z)^*\ra \C^*$ is
the cardinality $|\vphi((\Z/N\Z)^*)|$ of its image.
\begin{theorem}
Under the above hypothesis, $\rho$ comes from a modular
form $f$ of weight $k(\rho)$, level $N(\rho)$, and under a certain
extra assumption, character $\varepsilon$ of degree prime 
to $\ell$.
\end{theorem}
\par\noindent{\em Extra Assumption:} Not all of the following are true.
\begin{enumerate}
\item $\ell=3$,
\item $\rho|\Gal(\Qbar/\Q(\sqrt{-3}))$ is abelian, and
\item $\det(\rho)$ is {\em not} a power of 
       the mod 3 cyclotomic character $\chi$. 
\end{enumerate}

\begin{example}
If $\rho$ comes from the Galois representation on the $3$-torsion of an 
elliptic curve, then $\det(\rho)=\chi$ is the mod 3 cyclotomic character, 
so the extra assumption does hold and the theorem applies.
\end{example}

Let $\rho$ be a representation as above. Then it is likely that
    $$\det \rho:G_\Q\into\Fln$$ 
is ramified at $\ell$. 
Let $\chi$ be the mod $\ell$ cyclotomic character. 
\begin{proposition}
Let $\vphi:G_\Q\ra\Fln^*$ be a continuous homomorphism.  Then
 $\vphi=\theta\chi^i$ 
for some $i$ and some 
$\theta:G_\Q\into\Fln^*$ 
which is unramified at $\ell$.
\end{proposition}
\begin{proof}
Since $\vphi$ is continuous and $\Fln^*$ is finite, the subfield $K$ of
$\Qbar$ fixed by $\ker(\vphi)$ is a finite 
Galois extension of $\Q$.  Since the image of $\vphi$ is abelian,
the Galois group of $K$ over $\Q$ is abelian.  By the Kronecker-Weber
theorem \cite[X.3]{lang:ant} there is a cyclotomic 
extension $\Q(\zeta_n)=\Q(\exp^{2\pi i/n})$ which contains $K$. 
Since $\Gal(\Q(\zeta_n)/\Q)\isom (\Z/n\Z)^*$, the character
$\vphi$ gives a homomorphism $\vphi':(\Z/n\Z)^*\ra\Fln^*$. 
Write $n=m\ell^j$ with $m$ coprime to $\ell$. 
Then 
 $$(\Z/n\Z)^*\isom (\Z/m\Z \cross\Z/\ell^j\Z)^* 
            \isom (\Z/m\Z)^*\cross(\Z/\ell^j\Z)^*$$
which decomposes $\vphi'$ as a product 
$\theta'\cross \psi'$ where
\begin{eqnarray*}
\theta'&:&(\Z/m\Z)^*\ra\Fln^*\\
\psi'&:&(\Z/\ell^j\Z)^*\ra\Fln^*.
\end{eqnarray*}
%DECOMMENT
$$\xymatrix{
    &{\Qbar}\ar@{-}[d]\\
    &{\Q(\zeta_n)}\ar@{-}[dl]\ar@{-}[dr] \\
{\Q(\zeta_{\ell^j})}\ar@{-}[dr] \ar@{-}@/_2pc/|{(\Z/\ell^j\Z)^*}[ddr]
& & {\Q(\zeta_m)}\ar@{-}[dl]\ar@{-}@/^2pc/|{(\Z/m\Z)^*}[ddl] \\
  & K\ar@{-}^{\subset\Fln^*}[d] \\
  & {\Q}}$$
The character $\theta$ is obtained by lifting $\theta'$.  It is unramified
at $\ell$ because it factors through $\Gal(\Q(\zeta_m)/\Q)$ and 
$\ell\nmid m$.  The cardinality of $(\Z/\ell^j\Z)^*$ is $(\ell-1)\ell^{j-1}$
whereas the cardinality of $\Fln^*$ is $(\ell-1)(\ell^{\nu-1}+\cdots+1)$ 
so the image of $\psi'$ lies in $\Fl^*$.  Thus $\psi'$ lifts
to a power $\chi^i$ of the cyclotomic character. 
\end{proof}

Using the proposition write $\det(\rho) = \theta\chi^i$ with
$\theta$ unramified at $\ell$. 
As in the proof of the proposition we can write $\theta$
as a Dirichlet character $(\Z/m\Z)^*\into\Fln^*$.  
It can be shown using properties of conductors that 
$m$ can be chosen so that $m|N(\rho)$. 
Thus we view $\theta$ as a Dirichlet character
$$\theta:(\Z/N(\rho)\Z)^*\into\Fln^*.$$
Let $H=\ker\theta\subset(\Z/N(\rho)\Z)^*$. Define a congruence subgroup
$\Gamma_H(N)$ by
$$\Gamma_H(N)=\left\{\bigabcd \in \Gamma_0(N) : a, d\in H\right\}.$$

We have the following theorem.
\begin{theorem}\label{thm:charh} Suppose $\ell>2$ and $\rho$ satisfies the above assumptions 
including the extra assumption. Then $\rho$ arises from a form
in $$S_{k(\rho)}(\,\Gamma_H(N(\rho))\,).$$
\end{theorem}
In particular, the theorem applies if $\rho$ comes 
from the $\ell$-torsion representation on an elliptic 
curve, since then $\det=\chi$ so the extra assumption is satisfied. 

\subsection{A Counterexample}
One might ask if the extra assumption in Theorem~\ref{thm:charh}
is really necessary. At first Serre suspected it was not. 
But he was surprised to discover the following example 
which shows that the extra assumption can not 
be completely eliminated. 
The space $S_2(\Gamma_1(13))$ is 2 dimensional, spanned by the eigenform
$$f = q + \alpha{}q^2 + 
     (-2\alpha-4)q^3 + (-3\alpha-7)q^4 + (2\alpha+3)q^5 + \cdots$$
and the $\Gal(\Q(\sqrt{-3})/\Q)$-conjugate of $f$, 
where $\alpha^2+3\alpha+3=0$. 
The character $\eps:(\Z/13\Z)^*\into\C^*$
of $f$ has degree $6$.  
Let $\lambda=(\sqrt{3})$ and let
      $$\rhoflambar:\GalQ\into\GL(2,\F_3)$$ 
be the associated Galois representation.
Then $\det(\rhoflambar)=\chi\theta$ where $\chi$ is the mod 3 cyclotomic
character and $\theta\equiv\eps\pmod{3}$.
In particular $\theta$ has order $2$. 
Thus $H=\ker(\theta)\subset (\Z/13\Z)^*$ is exactly the
index two subgroup of squares in $(\Z/13\Z)^*$. 
The conclusion of the theorem can not hold since $S_2(\Gamma_H(13))=0$. 
This is because any form would have to have a character whose order is
at most two since it must be trivial on $H$, but 
$S_2(\Gamma_H(13))\subset S_2(\Gamma_1(13))$ and 
$S_2(\Gamma_1(13))$ is spanned by 
$f$ and its Galois conjugate, both of which have 
character of order $6$. 
In this example
\begin{itemize}
\item $\ell=3$,
\item $\rholamfbar|\Gal(\overline{\Q}/\Q(\sqrt{-3}))$ is abelian, and
\item $\det\rho$ is not a power of $\chi$.
\end{itemize}

A good way to see the second assertion is to consider 
the following formula: 
$$f\tensor\varepsilon^{-1}=\overline{f}$$
(up to an Euler factor at 13)
in the sense that 
  $$\rho_{f,\lambda}\tensor\varepsilon^{-1}=\rho_{\overline{f}}.$$
Now reduce mod $3$ to obtain
$$\rhoflambar\tensor\eps^{-1}\isom\rhoflambar$$
since $f\equiv\overline{f}\pmod{\sqrt{-3}}$ (since $3$ is ramified). 
Thus $\rhoflambar$ is isomorphic to a twist of itself by
a complex character so $\rhoflambar$ is 
reducible and abelian over the field 
corresponding to its kernel.
In fact, by the same argument,
$\rhoflambar$ is also abelian when restricted to 
the Galois groups of $\Q(\sqrt{13})$ and
$\Q(\sqrt{39})$.

[[Give more details and describe David Jones's thesis.]]

\section{The Weight revisited: level 1 case}
We are interested in the recipe for $k(\rho)$ in 
the level 1 case.  If we semisimplify and restrict to inertia we obtain 
a direct sum of two representations.  In the level 1 case
both representations are powers of the cyclotomic character.
There are thus two possibilities for $\rho|I$:
$$\rho|I=\mtwo{\chi^{\alpha}}{*}{0}{\chi^{\beta}}
\quad \text{ or }\quad
\rho|I=\mtwo{\chi^{\alpha}}{0}{0}{\chi^{\beta}}.$$
In the second case we guess $k(\rho)$ by 
looking at the exponents and normalizing 
as best we can.  Since $\alpha$
and $\beta$ are only defined mod $\ell-1$ we may, after relabeling if
necessary, assume that 
$0\leq\alpha\leq\beta\leq \ell-2$. 
Factoring out $\chi^{\alpha}$ we obtain
$$\chi^{\alpha}\tensor\mtwo{1}{0}{0}{\chi^{\beta-\alpha}}.$$
Next (secretly) recall that if $f$ is ordinary of weight $k$ then
$f$ gives rise to the representation
$$\mtwo{\chi^{k-1}}{*}{0}{1}$$
(here $*$ can be trivial).
If $f$ is of weight $\beta-\alpha+1$, applying the $\theta$ operator
$\alpha$ times gives the desired representation. 
Thus the recipe for the weight is 
$$w(\rho) = (\ell+1)\alpha+\beta-\alpha+1=\beta+\ell \alpha+1.$$
There is one caveat: Serre was uncomfortable
with weight $1$ forms, so if
$\alpha=\beta=0$ he defines $k(\rho)=\ell$ 
instead of $k(\rho)=1$. 

Ogus asks what is wrong with weight 1, and Ribet 
replies that Serre didn't know a satisfactory way in which to
define modular forms in weight 1.  Merel then adds
that Serre was frustrated because he could not do explicit 
computations in weight 1.

\subsection{Companion forms}
Suppose $f$ is ordinary ($a_{\ell}\not\in\lambda$) of weight $k$,
$2\leq k\leq \ell+1$, and let $\rhoflambar$ be  
the associated representation.
Then 
  $$\rhoflambar|I_\ell =\mtwo{\chi^{k-1}}{*}{0}{1}.$$
To introduce the idea of a companion form suppose that somehow 
by chance $*=0$.  Twisting $\rho$ by $\chi^{1-k}$ gives
$$\rho\tensor\chi^{1-k}|I_\ell=\rho\tensor\chi^{\ell-k}|I_\ell=
  \mtwo{1}{0}{0}{\chi^{\ell-k}}.$$
What is the minimum weight of a newform giving rise to 
such a representation?
Because the two characters $1$ and $\chi$ take values in $\Fl^*$ we
are in the level 1 situation. The representation is semisimple,
reducible, and $\alpha=0$, $\beta=\ell-k$, so the natural weight is
$\ell+1-k$. Thus Conjecture B predicts that there should exist another
form $g$ of weight $\ell+1-k$ such that 
$\rho_g\isom \rho_f\tensor\chi^{\ell-k}$ (over $\Flbar$). 
Such a form $g$ is called a {\em companion} of $f$. 
In characteristic $\ell$, we have $g=\theta^{\ell-k}f$.
This conjecture was for the most part proved by Gross \cite{gross:tameness} 
when $k\neq 2,\ell$,  and by Coleman-Voloch \cite{coleman-voloch}
when $k=\ell$. 
[[It would be nice to say something here about the {\em subtleties}
  involved in going from this mod $\ell$ form $g$ to the
  companion form $g$ produced by Gross-Coleman-Voloch.  Roughly,
  how are the two objects linked?]]

\subsection{The Weight: the remaining level 1 case}
Let 
  $$\rho:\GalQ\lra\GL(2,\fln)$$ 
be a Galois representation with $\ell>2$. 
Assume that $\rho$ is irreducible and modular.
Then $\rho$ comes from a modular form in
$S_{k(\rho)}(\Gamma_1(N\ell))$,
with $2\leq k(\rho)\leq \ell^2-1$. 
We still must define $k(\rho)$ in the remaining level 1 case
in which
$$\rho|I_{\ell}=\mtwo{\chi^{\alpha}}{*}{0}{\chi^{\beta}}.$$
If $\alpha\neq\beta+1$ then
$$k(\rho) = 1+\ell a+b$$ where
$a=\min(\alpha,\beta)$ and $b=\max(\alpha,\beta)$.
Now assume $\alpha=\beta+1$.
Then
$$\rho|I_{\ell}
     =\chi^{\beta}\tensor\mtwo{\chi}{*}{0}{1}.$$
Define a representation of $\GalQ$ by
$$\sigma=\rho\tensor\chi^{-\beta}\isom
  \mtwo{\chi}{*}{0}{1}.$$
We now give a motivated recipe for $k(\sigma)$. 
Granted that ``finite at $\ell$'' is defined in the next section, the recipe is
$$k(\sigma)=\begin{cases}2  &\text{if $\sigma$ is finite at $\ell$,}\\ 
                    \ell+1  &\text{otherwise}.\end{cases}$$
This is enough to determine $k(\rho)$ giving 
$$k(\rho)=k(\chi^{\beta}\tensor\sigma)=(\ell+1)\beta+k(\sigma).$$

\subsection{Finiteness}
We continue with the notation of the previous section.
Let 
 $$D = D_{\ell}=\GalQl\hookrightarrow\GalQ$$
denote a decomposition group at $\ell$. 
\begin{definition} 
We say that $\sigma|D$ is {\bf finite} if it
is equivalent to a representation of the form 
$\cG(\Qlbar)$, where $\cG$ is a finite flat 
$\fln$-vector space scheme over $\Zl$.
\end{definition}

This definition may not be terribly enlightening, so 
we consider the following special case. Suppose 
$E/\Q$ is an elliptic curve with 
semistable (=good or multiplicative)
reduction at $\ell$. 
Then $E[\ell]$ defines a representation
$$\sigma:\GalQ\into\Aut E[\ell]\isom\GL(2,\Fl).$$ 
Let $\Delta_E$ be the minimal discriminant of $E$. 
\begin{proposition}
With notation as above,
$\sigma$ is finite at $\ell$ if and only if 
$$\ord_{\ell}\Delta_E \equiv 0\pmod{\ell}.$$	
If $p\neq\ell$ (and $E$ has semistable reduction at $p$) then
$\sigma$ is unramified at $p$ if and only if
$$\ord_p\Delta_E\equiv 0\pmod{\ell}.$$ 
\end{proposition}

We give some hint as to how the proof goes when $p\con 1\pmod{\ell}$.
Let $E$ be an elliptic curve with multiplicative
reduction at $p$. Set $V=E[\ell]=\fl\oplus\fl$. We have a 
representation
$$\sigma:D=\GalQl\into \Aut V.$$
The theory of Tate curves gives an exact sequence of $D$-modules 
  $$0\into X\into V\xrightarrow{\alpha} Y\into 0.$$
Each of these terms is a $D$ module and $X$ and $Y$ are 1-dimensional
as $\Fl$-vector spaces. 
The action of $D$ on $Y$ is given
by an unramified character $\eps$ 
of degree dividing 2.  The action
of $D$ on $X$ is given by $\chi\eps$.

Next we define an element of $H^1(D,\Hom_{\Fl}(Y,X))$. 
A {\em splitting} $s:Y\into V$
is an $\Fl$-linear map (not necessarily a map of $D$-modules) 
such that  $\alpha s=1$.  Choose such a splitting.
For each $d\in D$ consider the twisting
$\presup{d}s:Y\into V$ defined by $\presup{d}s(y)=ds(d^{-1}y)$. 
Since
$$\alpha (d s (d^{-1}y)) = d (\alpha (s (d^{-1} y))) = d(d^{-1}y)=y$$
if follows that $\presup{d}s$ is again a splitting.
Thus $\presup{d}s-s:Y\into V$ followed by $\alpha:V\into Y$ is the
zero map.  Since $\presup{d}s-s$ is a linear map,
$\presup{d}s-s\in \Hom_{\Fl}(Y,X)$.
The map $d\mapsto \presup{d}s$ defines a 1-cocycle which
gives an element of $H^1(D,\Hom_{\Fl}(Y,X))$. 
There is an isomorphism of $D$-modules
$\Hom_{\Fl}(Y,X)\isom \mu_{\ell}$ so we have isomorphisms 
$$H^1(D,\Hom_{\Fl}(Y,X))\isom H^1(D,\mu_{\ell})\isom\Qp^*/(\Qp^*)^{\ell}.$$	
The last isomorphism follows from Kummer theory since $\Qp$ is
assumed to contain the $\ell$-th roots of unity (our assumption
that $p\con 1\pmod{\ell}$). 
Thus $\sigma$ defines an element of $\Qp^*/(\Qp^*)^\ell$. 
Serre proved that $\tau$ is finite if and only if the corresponding element
of $\Qp^*/(\Qp^*)^{\ell}$ is in the image of $\Zp^*$. 

If $E/\Qp$ is an elliptic curve with multiplicative reduction
then there exists a Tate parameter $q\in\Qp^*$ with
$\Val_p(q)>0$ such that 
     $$E\isom E_q:=\G_m/q^{\Z}$$
over the unique quadratic unramified extension of $\Qp$. 
The kernel of multiplication by $\ell$ gives rise to an 
exact sequence as above, which is obtained by applying the
snake lemma connecting $E[\ell]$ to $Y$ in the following diagram:
$$\xymatrix{
   0\ar[r]\ar[d]    & q^\Z\ar[rr]^{\ell}\ar[d]  &   &  q^\Z\ar[r]\ar[d] & Y\ar[d] \\
  X\ar[d]\ar[r]   & {\G_m}\ar[rr]^{\ell}\ar[d]  &   &  {\G_m}\ar[d]\ar[r] &  0 \\
E[\ell]\ar[r] &  E\ar[rr]^{\ell}    &   &   E
}$$
Furthermore, the element of $\Qp^*/(\Qp^*)^\ell$ defined 
by the representation comming from 
$E[\ell]$ is just the image of $q$.
One has 
$$\Delta_E=q\prod_{n=1}^{\infty}(1-q^n)^{24}.$$
Note that the product factor is a unit in $\Qp$, so
$\Val_p\Delta_E=\Val_p q$.

%fermat.tex

\chapter{Fermat's Last Theorem}
\section{The application to Fermat}
\begin{quote}	
``As part of this parcel, I can sketch the application to Fermat.'' 
\end{quote}

Suppose that semistable\index{semistable} elliptic curves over $\Q$ are modular.
Then FLT is true. Why? ``As I have explained {\em so many times}\ldots''
Suppose $\ell>5$ and 
$$a^{\ell}+b^{\ell}+c^{\ell}=0$$
with $abc\neq 0$, all relatively prime, and such
that $A=a^{\ell}\equiv -1\pmod{4}$, 
$B=b^{\ell}$ is even and $C=c^{\ell}\equiv 1\pmod{4}$. 
Then we consider the elliptic curve 
$$E:y^2=x(x-A)(x-B).$$
The {\em minimal discriminant} is 
$$\Delta_E=\frac{(ABC)^2}{2^8}$$
as discussed in Serre's \cite{serre:conjectures} and 
\cite{diamond-kramer}. The conductor $N_E$ is
equal to the product of the primes dividing $ABC$ (so in
particular $N_E$ is square-free). 
Furthermore, $E$ is semistable\index{semistable} -- the only hard place to 
check is at $2$. Diamond-Kramer checks this explicitly. 

Here is how to get Fermat's theorem. View $E[\ell]$ as a $G=\GalQ$-module.
The idea is to show that this representation must come from a modular
form of weight 2 and level 2. This will be a contradiction since
there are no modular forms of weight 2 and level 2. 
But to apply the level and weight theorem we need to know that $E[\ell]$
is irreducible. The proof of this is due to Mazur\index{Mazur}. 

Let $\rho:G\into\Aut E[\ell]$ be the Galois representation on the
$\ell$ torsion of $E$. Since $E$ is semistable\index{semistable} 
for $p\neq\ell$, $$\rho|I_p\isom
\Bigl(\begin{matrix}1&*\\0&1\end{matrix}\Bigr).$$
Assume $\rho$ is reducible. Then $\rho$ has an invariant subspace
so $$\rho\isom\Bigl(\begin{matrix}\alpha&*\\0&\beta\end{matrix}\Bigr).$$
Then from the form of $\rho|I_p$ we see that the characters 
$\alpha$ and $\beta$ could be ramified only at $\ell$. 
Thus $\alpha=\chi^i$ and $\beta=\chi^{1-i}$
where $\chi$ is the mod $\ell$ cyclotomic character. The exponents
are $i$ and $1-i$ since $\alpha\beta$ is the determinant which is
$\chi$. [[Why is $\chi$ supposed to be the only possible unramified
character? probably since whatever the character is, it is a product
of $\chi$ times something else, and the other factor is ramified.]]

What happens to $\rho$ at $\ell$, i.e., what is $\rho|I_{\ell}$? There
are only two possibilities. Either $\rho|I_{\ell}$ is the direct sum
of the two fundamental characters or it is the sum of the trivial character
with $\chi$. The second possibility must be the one which occurs. [[I 
do not understand why... something about ``characters globally are determined
by local information.'']] So either $i=0$ or $i=1$. If $i=0$,
$$\rho=\Bigl(\begin{matrix}1&*\\0&\chi\end{matrix}\Bigr).$$
This means that there is an element of $E[\ell]$ whose subspace is
left invariant under the action of Galois. Thus $E$ has a point
of order $\ell$ rational over $\Q$. If $i=1$ then
$$\rho=\Bigl(\begin{matrix}\chi&*\\0&1\end{matrix}\Bigr).$$
Therefore $\mu_{\ell}\hookrightarrow E[\ell]$. Divide to obtain
$E'=E/\mu_{\ell}$. The representation on $E[\ell]/\mu_{\ell}$
is constant (this is basic linear algebra) so the resulting
representation on $E'[\ell]$ has the form
$\Bigl(\begin{smallmatrix}1&*\\0&\chi\end{smallmatrix}\Bigr)$
so $E'$ has a rational point of order $\ell$. 

Now $E[2]$ is a trivial Galois module since it contains $3$
obvious rational points, namely $(0,0), (A,0),$ and $(B,0)$. 
Thus the group structure on the curve $E$ (or $E'$) (which we constructed
from a counterexample to Fermat) contains
$$\Z/2\Z\oplus\Z/2\Z\oplus\Z/\ell\Z.$$
In Mazur's\index{Mazur} paper [[``rational isogenies of prime degree'']]
he proves that $\ell\leq 3$. Since we assumed that $\ell>5$, this
is a contradiction. Notice that we have {\em not} just proved FLT. 
We have demonstrated the {\em irreducibility} of the Galois 
representation on the $\ell$ torsion of the elliptic curve $E$ 
arising from a hypothetical counterexample to FLT. 

We now have a representation
$$\rho:\GalQ\into\GL(2,\Fl)=\Aut E[\ell]$$
which is irreducible and modular of weight
$2$ and level $N=N_E$ (the conductor of $E$). 
Because $\rho$ is irreducible we conclude that
$\rho$ is modular of weight $k(\rho)$ and level
$N(\rho)$. 
Furthermore
$$\ord_{\ell}\Delta_E=\ord_{\ell}(ABC)^2
          =2\ell\ord_{\ell}abc\equiv 0\pmod{\ell}$$
so $k(\rho)=2$. 

We can also prove that $N(\rho)=2$. Clearly
$N(\rho)|N_E$. This is because $N(\rho)$ computed locally
at $p\neq\ell$ divides the power of $p$ in the conductor
of the $\ell$-adic representation for $E$ at $p$. [[I do not
understand this.]] Since $\rho$ is only ramified at $2$ or maybe $\ell$, 
$N(\rho)$ must be a power of $2$. For $p\neq \ell$, $\rho$ is ramified
at $p$ if and only if $\ord_p\Delta_E\not\equiv 0\pmod{\ell}$ which
does happen when $p=2$. 
Since $N_E$ is square free this implies that $N(\rho)=2$. 
But $S_2(\Gamma_1(2))=0,$
which is the ultimate contradiction! 

But how do we know semistable\index{semistable} elliptic curves over $\Q$ are modular?

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 4/19/96

\section{Modular elliptic curves}

\begin{theorem}[Theorem A] Every semistable\index{semistable} elliptic curve over 
$\Q$ is modular. \end{theorem}

There are several ways to define a modular elliptic curve. 
\begin{defn} Let $E$ be an elliptic curve. Then $E$ is {\em modular}
if there is a prime $\ell>2$ such that the associated
$\ell$-adic Galois representation
$$\rho_{E,\ell^{\infty}}:G=\GalQ\into\GL(2,\Zl)$$
defined by the $\ell$-power division points on $E$ is
modular (i.e., it is a $\rholamf$). 
\end{defn}
\begin{defn}
Let $E$ be an elliptic curve of conductor $N_E$. For each
prime $p$ not dividing $N_E$ one associates a number $a_p$
related [[in a simple way!]] to the number of points on
the reduction of $E$ modulo $p$. Then $E$ is {\em modular}
if there exists a cusp form $f=\sum b_n q^n$ which is an eigenform
for the Hecke operators such that $a_p=b_p$ for almost all $p$. 
In the end one deduces that $f$ can be chosen to have weight $2$,
trivial character, and level $N_E$. 
\end{defn}
\begin{defn}[Shimura]\index{Shimura}
An elliptic curve $E$ is modular if there is nonconstant
map $X_0(N)\into E$ for some $N$. 
\end{defn}

\begin{theorem}[Theorem B. Wiles, Taylor-Wiles] Suppose $E$ is a semistable\index{semistable}
elliptic curve over $\Q$ and suppose $\ell$ is an odd prime such that
$E[\ell]$  is irreducible and modular. Then $\rho_{E,\ell^{\infty}}$ is
modular and hence $E$ is modular. \end{theorem}

Now we sketch a proof that theorem B implies theorem A. 
First take $\ell=3$. If $E[3]$ is irreducible then by work
of Langlands-Tunnel we win. The idea is to take
$$\rho:G\into\GL(2,\F_3)\hookrightarrow\GL(2,\Z[\sqrt{-2}])\subset\GL(2,\C).$$
The point is that there are two maps 
$\Z[\sqrt{-2}]\into\F_3$ given by reduction modulo each
of the primes lying over $3$. Choosing one gives a map
$\GL(2,\Z[\sqrt{-2}])\into\GL(2,\F_3)$ which, for some
amazing reason [[which is?]], has a section. 
Then $\rho:G\into\GL(2,\C)$ is a continuous representation with 
odd determinant that must still be irreducible. By Langlands-Tunnel
we know that $\rho$ is modular and in fact $\rho$ comes from
a weight $1$ cusp form $f$ of level a power of 3 times powers of
most primes dividing $\cond(E)$. Reducing $f$ modulo some prime
of $\Z[\sqrt{-2}]$ lying over $3$ we obtain a mod $3$ modular
form which corresponds to $\rho:G\into E[3]$. The proof of all
this uses the immense base-change business in Langlands' book. 
[[Ribet next says: ``have to get 3's out of the level! This jacks up the
weight, and the level is still not square free. Then have to adjust
the weight again.'' I do not know what the point of this is.]]

Kevin Buzzard\index{Buzzard} asked a question relating to how one
knows the hypothesis needed for the theorem on weights and levels
applies in our situation. To answer this, suppose $\ell=3$ or $5$.
Form the associated representation $\rho:G\into\GL(2,\Fl)$ coming from
$E[\ell]$ and assume it is irreducible, modular and
semistable\index{semistable}.

\begin{defn}
A mod $\ell$ Galois representation is {\em semistable} if
for all $p\neq\ell$, the inertia group $I_p$ acts unipotently 
and the conjectured weight is $2$ or $\ell+1$. 
\end{defn}

Note that $\det\rho=\chi$. 
\begin{lemma} Under the above assumptions, $\ell$ divides the order
of the image of $\rho$. \end{lemma}
\begin{proof}
If not, then $\rho$ is finite at all primes $p$, since for primes $p\neq\ell$
inertia acts trivially [[some other argument
for $\ell$]]. Inertia acts trivially because if the order
of the image of $\rho$ is prime to $\ell$ then $\rho$ acts
diagonally. For if not then since $\rho|I_p$ is unipotent
(hence all eigenvalues are 1), in a suitable basis
something like $\Bigl(\begin{smallmatrix}1&\psi\\0&1\end{smallmatrix}\Bigr)$
is in the image of $\rho$ and has order $\ell$, a contradiction. 
Because of finiteness $k(\rho)=2$ and $N(\rho)=1$ which is a contradiction
since there are no forms of weight 2 and level 1. 
\end{proof}

Next we consider what happens if $E[3]$ is reducible. There are two
cases to consider. First suppose $E[5]$ is also reducible. Then
$E$ contains a rational subgroup of order $15$. We can check by hand
that all such curves are modular. The key result is that
$X_0(15)(\Q)$ is finite. 

The second possibility is that $E[5]$ is irreducible. In this case
we first find a curve $E'$ which is semistable\index{semistable} over $\Q$ such
that 
\begin{itemize}
\item $E'[5]\isom E[5]$ (this is easy to do because of the lucky
       coincidence that $X_0(5)$ has genus $0$)
\item $E'[3]$ is irreducible
\end{itemize}
Next we discover that $E'$ is modular since $E'[3]$ is irreducible.
This implies $E'[5]$ is modular hence $E[5]$ is modular. Theorem 
B then implies $E$ is modular. 
% 17.tex

\chapter{Deformations}
\index{deformations}
\section{Introduction}
For the rest of the semester let $\ell$ be an odd prime.
Let $\rho:G\into\GL(2,\Fln)$ be such that
\begin{itemize}
\item $\rho$ is modular
\item $\rho$ is irreducible
\item $\rho$ is semistable\index{semistable}
\end{itemize}
\begin{defn}The representation $\rho$ is {\em semistable} if 
\begin{itemize}
\item for all $p\neq\ell$,
$$\rho|I_p\isom\Bigl(\begin{matrix}1&*\\0&1\end{matrix}\Bigr),$$
($*$ is typically trivial since most primes are unramified.)
\item $k(\rho)=2\text{ or }\ell+1$.
\end{itemize}
\end{defn}
This means that there are 2 possibilities. 
\begin{enumerate}
\item $\rho$ is finite at $D_{\ell}$. 
\item $$\rho|D_{\ell}\isom
       \Bigl(\begin{matrix}\alpha&*\\0&\beta\end{matrix}\Bigr)$$ 
where $\beta$ is unramified. (Since $\det(\rho)=\chi$ we can add
that $\alpha|I_{\ell}=\chi$.) 
\end{enumerate}
If $k(\rho)=2$ then possibility 1 occurs. If $k(\rho)=\ell+1$ then
we are in case 2, but being in case 2 does not imply that $k(\rho)=\ell+1$. 
If $\rho$ comes from an elliptic curve $E/\Q$, then case 1 occurs if 
$E$ has good reduction at $\ell$ whereas case 2 occurs if $E$ has
ordinary multiplicative reduction [[I am not sure about this last
assertion because I missed it in class.]]. 

What is a deformation\index{deformations} of $\rho$ and when can we prove that it is modular?

Let $A$ be a complete local Noetherian ring with maximal ideal
$\m$ and residue field $\Fln$ (so $A$ is furnished with a map
$A/\m\iso\Fln$). Let 
$$\tilde{\rho}_A:G\into\GL(2,A)$$
be a representation which is ramified at only finitely many primes. 
Assume $\tilde{\rho}=\tilde{\rho}_A$ lifts $\rho$, i.e., the reduction of
$\tilde{\rho}$ mod $\m$ gives $\rho$. 

\begin{theorem} Let the notation be as above.  Then
$\tilde{\rho}$ is modular if and only if it satisfies ($*$).\end{theorem}

Neither of the terms in this theorem have been defined yet.

%%%%%% I do not have enough in my notes to define these terms yet.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%4/23/96, Ribetnotes.tex

\section{Condition $(*)$}
Let 
$$\rho:G=\GalQ\into \GL(2,\Fln)$$
be a Galois representation. 

The statement we wish to understand is
\begin{quote} 
    ``All $\tilde{\rho}$ which satisfy $(*)$ are modular.'' 
\end{quote}

Let $A$ be a complete local Noetherian ring with residue
field $\Fln$. This means that we are given a map $A/\m\isom\Fln$. 
Suppose $\tilde{\rho}:G\into\GL(2,A)$ satisfies the following conditions:
\begin{itemize}
\item $\tilde{\rho}$ lifts $\rho$,
\item $\det\tilde{\rho}=\tilde{\chi}$,
\item $\tilde{\rho}$ is ramified at only finitely many primes, and
\item condition $(*)$.
\end{itemize}

What is condition $(*)$? 
It the requirement that $\tilde{\rho}$ have the same qualitative
properties as $\rho$ locally at $\ell$. There are two cases to consider.

{\bfseries Case 1.} (arising from supersingular reduction at $\ell$)
Suppose $\rho$ is finite and flat at $\ell$. Then $\rho|I_{\ell}$ is
given by the 2 fundamental characters $$I_{\ell}\into\F^*_{\ell^2}$$
of level 2 (instead of from powers of these characters 
because of the semistability assumption). Condition
$(*)$ is that the lift of $\rho$ is also constrained to be
finite and flat. This means that for every $n\geq 1$,
$$\tilde{\rho}|D_{\ell} \mod \m^n : D_{\ell}\into \GL(2,A/\m^n)$$
is finite and flat, i.e., it comes from a finite flat\index{finite flat schemes} group scheme
over $\Zl$ which is provided with an action of $A/\m^n$ as endomorphisms.

{\bfseries Case 2.} (bad multiplicative reduction at $\ell$ or good
ordinary reduction at $\ell$) In case 2 
$$\rho|D_{\ell}\isom
    \Bigl(\begin{matrix}\alpha&*\\0&\beta\end{matrix}\Bigr)$$
where $\beta$ is unramified (equivalently $\alpha|I_{\ell}=\chi$). 
[[In the case of good ordinary reduction $\beta$ is given by the action
of Galois on $E[\ell]$ in characteristic $\ell$.]]
Condition $(*)$ is the requirement that
$$\tilde{\rho}|D_{\ell}\isom
    \Bigl(\begin{matrix}\tilde{\alpha}&*\\0&\tilde{\beta}\end{matrix}\Bigr),$$
where $\tilde{\beta}$ is unramified, $\tilde{\alpha}|I_{\ell}=\tilde{\chi}$.
It follows automatically that $\tilde{\beta}$ lifts $\beta$. 

\subsection{Finite flat representations}\index{finite flat representations}
In general what does it mean for $\rho$ to be finite and flat?
It means that there exists a finite flat\index{finite flat schemes} group scheme $\cG$ over
$\Zl$ such that $\cG(\Qlbar)$ is the representation space of $\rho$. 
This definition is {\em subtle}. 

Coleman asked if there is
a way to reformulate the definition without mentioning group schemes. 
Ribet mentioned Hopf algebras but then stopped. 
Buzzard\index{Buzzard} suggested some of the subtlety of the definition by claiming that
in some situation $\chi$ is finite flat\index{finite flat representations} whereas $\chi^2$ is not. 
Ogus\index{Ogus} vaguely conjectured that Fontaine's language is the way to 
understand this. 

It is possible in case 2 above for $\rho|D_{\ell}$ to be finite flat
without $\tilde{\rho}$ finite flat. The quintessential example is an
elliptic curve $E$ with supersingular reduction at $\ell$ 
such that $\ell|\ord_{\ell}\Delta_E$. 

\section{Classes of liftings}
Let $\Sigma$ be a finite set of prime numbers. We characterize a 
class of liftings $\tilde{\rho}$ which depends on $\Sigma$. 
What does it mean for $\tilde{\rho}$ to be in the class of deformations
\index{deformations}
corresponding to $\Sigma$? 

\subsection{The case $p\neq\ell$}
First we talk about the case when $p\neq\ell$. 
If $p\in\Sigma$ then there is no special condition on $\tilde{\rho}|I_p$.
If $p\not\in\Sigma$ one requires that $\tilde{\rho}$ is qualitatively 
the same as $\rho$. This means
\begin{enumerate}
\item If $\rho$ is unramified at $p$ (which is the usual case), then
we just require that $\tilde{\rho}$ is unramified at $p$. 
\item If $\rho$ is ramified but unipotent at $p$ so 
$$\rho|I_p\isom
    \Bigl(\begin{matrix}1&*\\0&1\end{matrix}\Bigr)$$
we require that 
$$\tilde{\rho}|I_p\isom
    \Bigl(\begin{matrix}1&*\\0&1\end{matrix}\Bigr).$$
This situation can occur with an elliptic curve which has multiplicative
reduction at $p$ and for which $\ell\nd\ord_p\Delta_E$. 
\end{enumerate}

At this point I mention the prime example. 
\begin{example} Suppose 
$\tilde{\rho}=\rho_{f,\lambda}$ is the $\lambda$-adic representation
attached to $f$. What can we say about $\ord_p N(f)$? We know that
$$\ord_p N(f)=\ord_p N(\rho) + \dim (\rho)^{I_p} - \dim (\tilde{\rho})^{I_p}$$
where $(\rho)^{I_p}$ means the inertia invariants in the representation
space of $\rho$. If $\rho$ is semistable then 
$$\ord_p N(\rho)+\dim (\rho)^{I_p} = 2.$$
Since we are assuming $\rho$ is semistable\index{semistable}, 
$\ord_p N(f)\leq 2$. Furthermore, the condition
$p\not\in\Sigma$ is a way of saying
$$\ord_p N(f) = \ord_p N(\rho). $$
Thus the requirement that $p\not\in\Sigma$ is that the
error term $\dim(\rho)^{I_p}-\dim(\tilde{\rho})^{I_p}$ vanish. 

Note that $\ord_p N(\tilde{\rho})=\ord_p N(f)$ by Carayol's theorem.
Thus $\ord_p N(f)$ is just a different way to write $\ord_p N(\tilde{\rho})$. 
\end{example}

\begin{example}
Imagine $\rho$ is ramified at $p$ and $\ord_p N(\rho)=1$. 
Then $\ord_p N(f)$ is either 1 or 2. The requirement that $p\not\in\Sigma$
is that $\ord_p N(f)=1$. 
\end{example}

\subsection{The case $p=\ell$}
Next we talk about the case $p=\ell$. There are two possibilities: 
either $\ell\in\Sigma$ or $\ell\not\in\Sigma$. If $\ell\in\Sigma$ then
we impose no {\em further} condition on $\tilde{\rho}$ (besides the already
imposed condition $(*)$, semistability at $\ell$, etc.). If $\ell\not\in\Sigma$
and $\rho$ if finite and flat (which is not always the case) then we require
$\tilde{\rho}$ to be finite and flat. If $\ell\not\in\Sigma$ and $\rho$
is not finite flat\index{finite flat representations} then no further restriction (this is the Tate curve\index{Tate curve}
situation). 

%%%%%%
Suppose $\tilde{\rho}=\rho_{f,\lambda}$, and $\tilde{\rho}$ belongs
to the class defined by $\Sigma$. We want to {\em guess} (since there
is no Carayol theorem) an integer $N_{\Sigma}$ such that
$N(f)|N_{\Sigma}$. What is $N_{\Sigma}$? It will be
$$N_{\Sigma}=\prod_{\substack{p\neq\ell\\p\in\Sigma}} p^2
            \cdot \prod_{\substack{p\neq\ell\\p\not\in\Sigma}}
                         p^{\ord_p N(\rho)}
            \cdot \ell^{\delta}.$$
Here $\ord_p N(\rho)$ is 1 if and only if $\rho$ is ramified at $p$. 
The exponent $\delta$ is either $0$ or $1$. It is $1$ if and only if
$k(\rho)=\ell+1$ or $\ell\in\Sigma$ and $\rho$ is ordinary at $\ell$,
i.e., $$\rho|D_{\ell}\isom
         \Bigl(\begin{matrix}\alpha&*\\0&\beta\end{matrix}\Bigr).$$
[[This definition could be completely wrong. It was definitely not
presented clearly in class.]]

There is an exercise associated with this. It is to justify {\em a priori}
the definition of $\delta$. Suppose, for example, that $\rho_{f,\lambda}$
satisfies $(*)$, then we want to show that $\ell^2\nd N(f)$. 

\begin{theorem}
Every $\tilde{\rho}$ of class $\Sigma$ comes from
$S_2(\Gamma_0(N_{\Sigma}))$. \end{theorem}

Define an approximation $\T$ to the Hecke algebra by
letting
$$\T=\Z[\ldots,T_n,\ldots]\subset\End(S_2(\Gamma_0(N_{\Sigma})))$$
where we adjoin only those $T_n$ for which $(n,\ell N_{\Sigma})=1$. 
For some reason there exists a map
$$\T\into\Fln: \quad T_r\mapsto \tr \rho(\Frob_r).$$
Why should such a map exist?
The point is that we know by the theorem that $\rho$ comes by reduction 
from a $\rho_{f,\lambda}$ with $f\in S_2(\Gamma_0(N_{\Sigma}))$. 

But there is a wrinkle. [[I do not understand: He says: ``Clearly
$N(\rho)|N_{\Sigma}$. $k(\rho)=2$ or $\ell+1$. If $k(\rho)=\ell+1$
then $\delta=1$ so $\ell|N_{\Sigma}$. Have to slip over to 
weight 2 in order to get $f$.'' This does not make any sense to me.]]



\section{Wiles's Hecke algebra}
Composing the map $\T\into\cO_{E_f}$ with reduction mod $\lambda$
from $\cO_{E_f}$ to $\Fln$ we obtain a map
$\T\into\Fln$. Let $\m$ be the kernel. Then $\m$ is a maximal
ideal of $\T$. Wiles's Hecke algebra is the completion
$\T_{\m}$ of $\T$ at $\m$. [[For some reason]] there exists
$$\tilde{\rho}:G=\GalQ\into\GL(2,\T_{\m})$$
such that $\tr(\tilde{\rho}(\Frob_r))=T_r$. 
What makes this useful is that $\tilde{\rho}$ is {\em universal}
for lifts of type $\Sigma$. This means that given any lift $\tau$
of type $\Sigma$ there exists a map
$$\varphi:\GL(2,\T_{\m})\into\GL(2,A)$$ such that
$\tau=\varphi\tilde{\rho}$. 

Another key idea is that the approximation $\T$ obtained
by just adjoining those $T_n$ with $(n,\ell N_{\Sigma})=1$
is, after completing at certain primes,
actually equal to the whole Hecke algebra. 

\chapter{The Hecke Algebra $T_{\Sigma}$}

\section{The Hecke algebra}
Throughout this lecture $\ell\neq p$ and $\ell\geq 3$. 
We are studying the representation $\rho:G\into\GL(2,\Fln)$. 
This is an irreducible
representation, $\ell$ is odd, $\rho$ is semistable\index{semistable},
and $\det\rho=\chi$. 
To single out certain classes of liftings we let
$\Sigma$ be a finite set of primes. Let $A$ be a complete
local Noetherian ring with residue filed $\Fln$. 
We take liftings
$\tilde{\rho}:G\into \GL(2,A)$ such that
$\tilde{\rho}$ reduces down to $\rho$,
$\det\tilde{\rho}=\tilde{\chi}$,
and $\tilde{\rho}$ is ``like'' $\rho$ away from $\Sigma$. For
example, if $\rho$ is unramified at $p$ we also want $\tilde{\rho}$
unramified at $p$, etc. 

Assume $\tilde{\rho}$ is modular. 
We guess the serious divisibility condition that $N(f)|N_{\Sigma}$. 
Recall that 
$$N_{\Sigma}=\prod_{\substack{p\neq\ell\\p\in\Sigma}} p^2
            \cdot \prod_{\substack{p\neq\ell\\p\not\in\Sigma}}
                         p^{\ord_p N(\rho)}
            \cdot \ell^{\delta}.$$
To define $\delta$ consider two cases. 
\begin{itemize}
\item {\em level 1 case.} Take $\delta=1$ if $\ell\in\Sigma$
or if $\rho$ is not finite at $\ell$. Take $\delta=0$ otherwise.
\item {\em level 2 case.} This is the case when $\rho|I_{\ell}$
has order $\ell^2-1$. Take $\delta=0$. 
\end{itemize}

{\em A priori} nobody seems to know how to prove that $N(f)|N_{\Sigma}$
given only that $\tilde{\rho}$ is modular. In the end we will show
that all modular $\tilde{\rho}$ in fact come from
$$S_2(\Gamma_0(N_{\Sigma})).$$
This can be regarded as a proof that $N(\rho)|N_{\Sigma}$. 

Last time we tried to get things going by defining the {\em anemic Hecke algebra}
$$\T=\Z[\ldots,T_n,\ldots]\subset \End(S_2(\Gamma_0(N_{\Sigma})))$$
where we only adjoin those $T_n$ for which $(n,\ell N_{\Sigma})=1$. 
By some level lowering theorem there exists an 
$f\in S_w(\Gamma_0(N_{\Sigma}))$ giving $\tilde{\rho}$ so we 
obtain a map $\T\into \F$. The map sends $T_n$ to the reduction modulo 
$\lambda$ of its eigenvalue on $f$. ($\lambda$ is a prime of the 
ring of integers of $E_f$ lying over $\ell$.)
[[... something about needing an $f$ of the right level = $N(\rho)$.]]

Let $\m\subset\T$ be the kernel of the above defined map
$\T\into\F$. Then $\m$ is a maximal ideal. Let $\T_{\m}$ be the
completion of $\T$ at $\m$ and note that
$$\T_{\m}\hookrightarrow \T\tensor_{\Z}\Zl.$$
We need to know that $\T_{\m}$ is Gorenstein. This is done
by comparing $\T_{\m}$ to some full Hecke ring. Thus
$$\T\subset R=\Z[\ldots,T_n,\ldots]\subset\End(S_2(\Gamma_0(N_{\Sigma})))$$
where the full Hecke ring $R$ is obtained by adjoining
the $T_n$ for {\em all} integers $n$.
We should think of $R$ as
$$R=\T[T_{\ell}, \{U_P : p|N_{\Sigma}\}].$$
Note that $T_{\ell}$ may or may not be a $U_{\ell}$ depending on
if $\ell|N_{\Sigma}$. 

\begin{lemma} If $\ell\nd N_{\Sigma}$ then $R=\T[U_p,\ldots]$. Thus
if $T_{\ell}$ is not a $U_{\ell}$ then we do not need $T_{\ell}$. 
\end{lemma}
\begin{proof}
``This lemma is an interesting thing and the proof goes as follows. 
Oooh. Sorry, this is not true. Ummm.... hmm.''

The ring $\T[U_p,\ldots]$ is clearly of finite index in $R$ since:
if $q$ is a random prime number consider 
$R\tensor_{\Z}\Q_q$ compared to $\T[U_p,\ldots]\tensor_{\Z}\Q_q$. 
[[I do not know how to do this argument. The lemma as stated above
probably isn't really true. The point is that the following lemma
is the one we need and it is true.]]
\end{proof}

Let $\T[U_p,\ldots]$ be the ring obtained by adjoining to $\T$
just those $U_p$ with $p|N_{\Sigma}$.
\begin{lemma} 
  If $\ell\nd N_{\Sigma}$ then the 
  index $(R:\T[U_p,\ldots])$ is prime to $\ell$. 
  Note that we assume $\ell\geq 3$. 
\end{lemma}
\begin{proof}
We must show that the map $\T[U_p,\ldots]\into R/\ell R$ is surjective.
[[I thought about it for a minute and did not see why this suffices. Am
I being stupid?]]
Let $A=\F_{\ell}[T_n : (n,\ell)=1]$ be the image of 
$\T[U_p,\ldots]$ in $R/\ell R$ so we have a diagram
$$\xymatrix{
{\T[U_p,\ldots]}\ar[rrr]\ar[drr] &&&R/\ell R\\
               &&A\ar[ur]   
}$$
We must show that $A=R/\ell R$. 
There is a beautiful duality
$$R/\ell R\cross S_2(\Gamma_0(\ns);\Fl)\longrightarrow\Fl 
             \quad \text{(perfect pairing)}.$$
Thus $A^{\perp}=0$ if and only if $A=R/\ell R$. 

Suppose $0\neq f\in A^{\perp}$, then $a_n(f)=0$ for all $n$ such
that $(n,\ell)=1$. Thus $f=\sum a_{n\ell}q^{n\ell}$. Let
$\theta=q\frac{d}{dq}$ be the theta operator. Since the characteristic
is $\ell$, $\theta(f)=0$.
On the other hand $w(f)=2$ and since $\ell\geq 3$, $\ell\nd 2$. 
Thus $w(\theta f)=w(f)+\ell+1=2+\ell+1$ which is a contradiction since
$\theta f=0$ and $w(0)=0\neq 3+\ell$. 
[[The weight is an integer {\em not} a number mod $\ell$, right?]]
\end{proof}

\begin{example} The lemma only applies if $\ell\geq 3$. Suppose $\ell=2$
and consider $S_2(\Gamma_0(23))$. Then 
$$\T[U_p,\ldots]=\Z[\sqrt{5}]\subset R=\Z[\frac{1+\sqrt{5}}{2}]$$
so $(R:\T[U_p,\ldots])$ is not prime to $2$. 
\end{example}

\begin{remark}
If $N=\ns$ then
$$\rank_{\Z}\T=\sum_{M|N}S_2(\Gamma_0(M))^{\new}$$
and 
$$\rank_{\Z} R = \dim S_2(\Gamma_0(N)).$$
There is an injection
$$\bigoplus_{M|N} S_2(\Gamma_0(M))^{\new}\hookrightarrow S_2(\Gamma_0(N))$$
but $\oplus S_2(\Gamma_0(M))^{\new}$ is typically much smaller
than $S_2(\Gamma_0(N))$. 
\end{remark}

\section{The Maximal ideal in $R$}
The plan is to find a special maximal ideal $\m_R$ 
of $R$ lying over $\m$. 
$$\xymatrix{
*+{\m_R} \ar@{-}[r]& *+{R}\\
*+{\m} \ar@{-}[u]\ar@{-}[r] & *+{\T}\ar@{-}[u]
}$$
Once we finally find the correct $\m$ and $\m_R$ we will
be able to show that the map
$\T_{\m}\into R_{\m_R}$ is an isomorphism. 
In finding $\m_R$ we will not invoke some abstract going up theorem
but we will ``produce'' $\m_R$ by some other process.
The ideal $\m$ was defined by a newform $f$ level $M|\ns$. 
The coefficients of $f$ lie in 
$$\cO_{\lambda}=(\cO_{E_f})_{\lambda}$$
where $E_f$ is the coefficient ring of $f$ and $\lambda$ is a
prime lying over $\ell$. Thus $\cO_{\lambda}$ is an $\ell$-adic
integer ring. Composing the residue class map $\cO_{\lambda}\into\Fbar$
with the eigenvalue map $\T\into\cO_{\lambda}$ we obtain
the map $\T\into\Fbar$. 

In order to obtain the correct $\m_{R}$ we will make a sequence
of changes to $f$ to make some good newform. [[Is the motivation for
all this that the lemma will not apply if $\ell|\ns$?]]

\subsection{Strip away certain Euler factors}
Write
$f=\sum a_n q^n$. Replace $f$ by 
$$h=\sum_{\text{certain $n$}} a_n q^n$$
where the sum is over those $n$ which are prime to 
each $p\in\Sigma$. 
What does this mean?
 If we think about the $L$-function
$L(f,s)=\prod_p L_p(f,s)$, then $h$ has $L$-function
$$L(h,s)=\prod_{p\not\in\Sigma} L_p(f,s).$$
Furthermore making this change does not take us out of $S_2(\Gamma_0(\ns))$,
i.e., $h\in S_2(\Gamma_0(\ns))$. 
[[He explained why but my notes are very incomplete. They say: Why. Because
$h=(f\tensor\varepsilon)\tensor\varepsilon$, ($\varepsilon$ Dirichlet
character ramified at primes in $\ns$). Get a form of level
$\lcm(\prod_{p\in\Sigma}p^2,N(f))|\ns$. 
Can strip and stay in space since $\ns$ has correct squares
built into it.]]

\begin{remark}
Suppose that $p||\ns$. Then $p\not\in\Sigma$ and $p||N(\rho)$. 
The level of $f$ is 
$$N(f)=\begin{cases}N(\rho),&\text{if $k(\rho)=2$}\\
                    N(\rho)\ell,&\text{if $k(\rho)=\ell+1$}\end{cases}.$$
If $p||N(\rho)$ then $f|T_p=a_p(f)f$. 
Thus $h$ is already an eigenform for $T_p$ unless $p\in\Sigma$
in which the eigenvalue is $0$.

[[I do not understand this remark. Why would the eigenvalue
being 0 mean that $T_p$ is not an eigenform? Furthermore, what is the
point of this remark in the wider context of transforming $f$ into a 
good newform.]]
\end{remark}

\subsection{Make into an eigenform for $U_{\ell}$}
We perform this operation to $f$ to obtain a form $g$ then apply
the above operation to get the ultimate $h$ having the desired properties. 
Do this if $\ell|\ns$ but $\ell\nd N(f)$. This happens precisely
if $\ell\in\Sigma$ and $\rho$ is good and ordinary at $\ell$. 
Then $f|U_{\ell}$ is just some random junk. Consider
$g=f+*f(q^{\ell})$ where $*$ is some coefficient. 
We see that if $*$ is chosen correctly then 
$g|U_{\ell}=Cg$ for some constant $C$. There are 2 possible
choices for $*$ which lead to 2 choices for $C$. Let $a_{\ell}=a_{\ell}(f)$, 
then $C$ can be either root of
$$X^2+a_{\ell}X+\ell=0.$$
This equation has exactly one unit root in $\cO_{\lambda}$. The reason
is because we are in the ordinary situation so $a_{\ell}$ is a unit. But
$\ell$ is not a unit. The sum of the roots is a unit but the product
is not. [[Even this is not clear to me right now. Definitely
check this later.]]
Make the choice of $*$ so that real root is $C$. Then we obtain
a $g$ such that 
$$g|U_{\ell}=\text{(unit)}\cdot g.$$

Next apply the above procedure to strip $g$ and end up with an $h$ such that
\begin{itemize}
\item $h|U_{\ell}=\text{(unit)}\cdot h$,
\item $h|U_p=0$ for $p\in\Sigma$ ($p\neq\ell$), and
\item $h|T_p=a_p(f)\cdot h$ for $p\not\in\Sigma$. 
\end{itemize}

Now take the form $h$. It gives a map
$R\into\cO_{\lambda}$ which extends $\T\into\cO_{\lambda}$. 
Let $\m_R$ be the kernel of the map $R\into\Fbar$ 
obtained by composing $R\into\cO_{\lambda}$ 
with $\cO_{\lambda}\into\Fbar$. A lot of further analysis
shows that $\T_{\m}\into R_{\m_r}$ is an isomorphism. 
We end up having to show separately that the map is injective
and surjective. 

[[In this whole lecture $p\neq\ell$.]]

[[Wiles's notation: His $\T_{\m_R}$ is my $\R$ and his $\T'$ is my
$\T_{\m}$. 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 4/26/96, ribetnotes.tex
\section{The Galois representation}

We started with a representation $\rho$, chose a finite set of primes
$\Sigma$ and then made the completed Hecke algebra $\T_{\m}$. Our goal
is to construct the universal deformation\index{deformations} of $\rho$ of type $\Sigma$. 
The universal deformation is a representation
$$\tilde{\rho}:G\into\GL(2,\T_{\m})$$ 
such that for all primes $p$ with $p\nd\ell\ns$,
$\tilde{\rho}(\Frobp)$ has trace $T_p\in\T_{\m}$ and determinant $p$. 

We now proceed with the construction of $\tilde{\rho}$. 
Let $$\T=\Z[\ldots,T_n,\ldots], \quad (n,\ell\ns)=1$$
be the anemic Hecke algebra. Then $\T\tensor\Q$ decomposes as 
a product of fields
$$\T\tensor\Q=\prod_{f} E_f$$
where the product is over a set of representatives for the Galois
conjugacy classes of newforms of weight 2, 
trivial character, and 
level dividing $\ns$. Since $\T$ is integral (it is for example a finite
rank $\Z$-module), $\T\hookrightarrow\prod_{f}\cO_{f}$. 
Since $\Zl$ is a flat $\Z$-module, 
$$\T\tensor\Zl\hookrightarrow \prod_{f}\cO_f\tensor\Zl
=\prod_{f,\lambda}\cO_{f,\lambda}$$
where the product is over a set of representatives $f$ 
and all $\lambda|\ell$. 

$\T_{\m}$ is a direct factor of $\T\tensor\Zl$. 
[[This is definitely not the assertion that $\T_{\m}$ is an
$\cO_{f,\lambda}$. What exactly is it the assertion of really?]]

We can restrict the product to a certain finite set 
$S$ and still obtain an injection
$$\T_{\m}\hookrightarrow \prod_{(f,\lambda)\in S} \cO_{f,\lambda}.$$
The finite set $S$ consists of those $(f,\lambda)$ such that
the prime $\lambda$ of $\cO_f$ pulls back to $\m$ under
the map $\T\into\cO_f$ obtained by composing 
$\T\into\prod_f\cO_f$ with the projection onto $\cO_f$. 
[[Why is this enough so that $\T_{\m}$ still injects in?]]
Restricting to a finite product is needed so that
$$[\prod_{(f,\lambda)\in S}\cO_{f,\lambda}:\Tm]<\infty.$$ 

Given $f$ and $\lambda$ there exists a representation 
$$\rho_{f,\lambda}:G\into\GL(2,\cO_{f,\lambda}).$$
It is such that
$\tr \rho_{f,\lambda}(\Frob_p)=a_p$ is
the image of $T_p$ under the inclusion
$$\T\tensor\Zl\hookrightarrow\prod_{(f,\lambda)\in S}\cO_{f,\lambda}.$$
Put some of these $\rho_{f,\lambda}$ together to create
a new representation
$$\prod_{(f,\lambda)\in S}\rho_{f,\lambda}:
           G\xrightarrow{\qquad\rho'\qquad}\GL(2,\prod\cO_{f,\lambda})
                  \,\subset\, \GL(2,\Tm\tensor\Q).$$
The sought after universal 
deformation\index{deformations} $\tilde{\rho}$ is a map making
the following diagram commute
$$\xymatrix{
   G\ar[rr]^{\rho'}\ar[dr]_{\tilde{\rho}} && \GL(2,\Tm\tensor\Q)\\
                       & \GL(2,\Tm)\ar@{^(->}[ur]
}$$
\begin{theorem}
   $\rho'$ is equivalent to a representation taking values
   in $\GL(2,\Tm)$. 
\end{theorem}

One way to [[try to]] prove this theorem is by invoking a general 
theorem of Carayol. [[and then what? does this way work? why is it not
a good way?]]
But the right way to prove the theorem is Wiles's way. 

\subsection{The Structure of $\Tm$}
Just as an aside let us review the structure of $\Tm$. 
\begin{itemize}
\item $\Tm$ is local.
\item $\Tm$ is not necessarily a discrete valuation ring. 
\item $\Tm\tensor\Q$ is a product of finite extensions of $\Ql$.
\item $\Tm$ is not necessarily a product of rings $\cO_{f,\lambda}$. 
\item $\Tm$ need not be integral.
\end{itemize}

\subsection{The Philosophy in this picture}
Choose $c$ to be a complex conjugation in $G=\GalQ$. 
Since $\ell$ is odd $\det(c)=-1$ is a
very strong condition which rigidifies the situation. 

\subsection{Massage $\rho$}
Choose two 1-dimensional subspaces so that
$$\rho(c)=\Bigl(\begin{matrix}-1&0\\0&1\end{matrix}\Bigr)$$
with respect to any basis consisting of one vector from 
each subspace. 
For any $\sigma\in G$ write 
$$\rho(\sigma)=
     \Bigl( 
        \begin{matrix}
            a_{\sigma} & b_{\sigma}\\
            c_{\sigma} & d_{\sigma}
        \end{matrix}
     \Bigr).$$
Then $a_{\sigma}d_{\sigma}$ and $b_{\sigma}c_{\sigma}$ are somehow
intrinsically defined. This is because
$$\rho(\sigma c)=
     \Bigl( 
        \begin{matrix}
            -a_{\sigma} & ?\\
            ? & d_{\sigma}
        \end{matrix}
     \Bigr)$$
so
$$a_{\sigma}=\frac{\tr(\rho(\sigma))-\tr(\rho(\sigma{}c))}{2}$$
and 
$$d_{\sigma}=\frac{\tr(\rho(\sigma))+\tr(\rho(\sigma{}c))}{2}.$$
Since we know the determinant it follows that 
$b_{\sigma}c_{\sigma}$ is also 
intrinsically known. 
[[The point is that we know certain things about
these matrices in terms of their traces and determinants.]]

\begin{proposition} 
     There exists $g\in G$ such that $b_g c_g\neq 0$. 
\end{proposition}
\begin{proof}
Since $\rho$ is irreducible there exists $\sigma_1$ such that
$b_{\sigma_1}\neq 0$ and there exists $\sigma_2$ such that
$c_{\sigma_2}\neq 0$. If $b_{\sigma_2}\neq 0$ or $c_{\sigma_1}\neq 0$
then we are done. So the only problem case is when
$b_{\sigma_1}=0$ and $c_{\sigma_2}=0$. Easy linear algebra shows
that in this situation $g=\sigma_1 \sigma_2$ has the required property. 
\end{proof}

Now rigidify by choosing a basis so that $b_g=1$. Doing this does not
fix a basis because they are many ways to choose such a basis. 

\subsection{Massage $\rho'$}
Choose a basis of $(\Tm\tensor\Q)^2$ so that 
$$\rho'(c)=\Bigl(\begin{matrix}-1&0\\0&1\end{matrix}\Bigr).$$
For any $\sigma\in G$ write
$$\rho'(\sigma)=\Bigl( 
        \begin{matrix}
            a_{\sigma} & b_{\sigma}\\
            c_{\sigma} & d_{\sigma}
        \end{matrix}\Bigr)$$


Using an argument as above shows that $a_{\sigma}, d_{\sigma}\in\Tm$
since the traces live in $\Tm$. Furthermore $b_{\sigma}c_{\sigma}\in\Tm$
since the determinant is in $\Tm$. 

The {\em key observation} is that $b_{\sigma} c_{\sigma}$ reduces
mod $\m$ to give the previous $b_{\sigma}c_{\sigma}\in\F$ corresponding
to $\rho(\sigma)$. This is because the determinants and traces of
$\rho'$ are lifts of the ones from $\rho$. Since $\m$ is the maximal
ideal of a local ring and $b_g c_g$ reduces mod $\m$ to something nonzero
it follows that $b_g c_g$ is a unit in $\Tm$. 

Choose a basis so that 
$$\rho'(c)=
   \Bigl(\begin{matrix}-1&0\\
                      0& 1
        \end{matrix}\Bigr)$$
and also so that
$$
\rho'(g)=
   \Bigl(\begin{matrix}a_g&1\\
                      u& d_g
        \end{matrix}\Bigr) \in \GL(2,\Tm).$$
Here $u$ is a unit in $\Tm$. 
\begin{proposition}
  Write 
    $$\rho'(\sigma)=
      \Bigl(\begin{matrix}a_{\sigma} & b_{\sigma}\\
                      c_{\sigma} & d_{\sigma}
           \end{matrix}\Bigr)$$ 
with respect to the basis chosen above. 
  Then $a_{\sigma}, b_{\sigma}, c_{\sigma}, d_{\sigma}\in\Tm$. 
\end{proposition}
\begin{proof}
We already know that $a_{\sigma}, d_{\sigma}\in\Tm$. The question is
how to show that $b_{\sigma}, c_{\sigma}\in \Tm$. 
Since
$$\rho'(\sigma g)=
      \Bigl(\begin{matrix}a_{\sigma}a_{g}+b_{\sigma}u & ?\\
                         ? & c_{\sigma}+d_{\sigma}d_g
           \end{matrix}\Bigr)$$ 
we see that $a_{\sigma}a_g+b_{\sigma}u\in\Tm.$ Since
$a_{\sigma}a_g\in\Tm$ it follows that $b_{\sigma}u\in\Tm$. 
Since $u$ is a unit in $\Tm$ this implies $b_{\sigma}\in\Tm$. 
Similarly $c_{\sigma}+d_{\sigma} d_g\in\Tm$ so $c_{\sigma}\in\Tm$. 
\end{proof}

As you now see, in this situation we can prove Carayol's theorem 
with just some matrix computations. 
[[This is basically a field lowering representation theorem.
The thing that makes it easy is that there exists something (namely
$c$) with distinct eigenvalues which is rational over the residue
field. Schur's paper, models over smaller fields. ``Schur's method''.]]

\subsection{Representations from modular forms mod $\ell$}

If you remember back in the 70's people would take an
$f\in S_2(\gon;\F)$ which is an eigenform for almost
all the Hecke operators
$$T_p f=c_p f\quad\text{ for almost all $p$, and $c_p\in\F$}.$$
The question is then:
Can you find 
$$\rho:G\into\GL(2,\F)$$
such that
$$\tr(\rho(\Frobp))=c_p\text{ and }\det(\rho(\Frobp))=p$$
for all but finitely many $p$?
The answer is yes. 
The idea is to find $\rho$ by taking $\rho_{f,\lambda}$ [[which was
constructed by Shimura?]] for some $f$ and reducing mod $\lambda$. 
The only special thing that we need is a lemma saying that the eigenvalues
in characteristic $\ell$ lift to eigenvalues in characteristic $0$.

\subsection{Representations from modular forms mod $\ell^n$}
Serre and Deligne asked: ``What happens mod $\ell^n$?'' 

More precisely, let $R$ be a local finite Artin ring such that
$\ell^n R=0$ for some $n$. 
Take $f\in S_2(\gon;R)$ satisfying the hypothesis
$$\{r\in R : rf=0 \} = \{0\}.$$
This is done to insure that certain eigenvalues are unique. 
Assume that for almost all $p$ one has
$T_p f = c_p f$ with $c_p\in R$. 
The problem is to find $\rho:G\into\GL(2,R)$ such that
$$\tr(\rho(\Frobp))=c_p\text{ and }\det(\rho(\Frobp))=p$$
for almost all $p$. 

The big stumbling block is that $\rho$ need not be the reduction
of some $\rho_{g,\lambda}$ for any $g, \lambda$. [[I couldn't understand
why -- I wrote ``can mix up $f$'s from characteristic 0 so can not
get one which reduces correctly.'']]

Let $\T=\Z[\ldots,T_p,\ldots]$ where we only adjoin those $T_p$ 
for which $f$ is an eigenvector [[I made this last part up, but
it seems very reasonable]]. Then $f$ obviously gives a rise to
a map 
$$\T\into R : T\mapsto \text{ eigenvalue of $T$ on $f$ }.$$
The strange hypothesis on $f$ insures that the eigenvalue is unique. 
Indeed, suppose $Tf=a f$ and $Tf=bf$, then $0=Tf-Tf=af-bf=(a-b)f$
so by the hypothesis $a-b=0$ so $a=b$. 

Since the pullback of the maximal ideal of $R$ is a maximal ideal 
of $\T$ we get a map $\Tm\into R$ for some $\m$. [[I do not
understand why we suddenly get this map and I do not know why the
pullback of the maximal ideal is maximal.]]

Now the problem is solved. Take $\rho':G\into\GL(2,\Tm)$
with the sought after trace and determinant properties. 
Then let $\rho$ be the map obtained by composing with the
map $\GL(2,\Tm)\into\GL(2,R)$. 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 4/29/96, ribetnotes.tex
\section{$\rho'$ is of type $\Sigma$}
Let $\rho$ be modular irreducible and 
semistable\index{semistable} mod $\ell$ representation
with $\ell>2$. Let $\Sigma$ be a finite set of primes. 
Then $N(\rho)|N_{\Sigma}$.
We constructed the anemic Hecke algebra $\T$ which contains a
certain maximal ideal $\m$. We then consider the completion
$\Tm$ of $\T$ at $\m$. Next we constructed 
$$\rho':G\into\GL(2,\Tm)$$ lifting $\rho$. Thus the diagram
$$\xymatrix{
  G\ar[rr]^{\rho'}\ar[drr]_{\rho} && {\GL(2,\Tm)}\ar[d]\\
                 && {\GL(2,\F)}
}$$
commutes. 

Some defining properties of $\rho'$ are
\begin{itemize}
\item $\det \rho'=\tilde{\chi}$.
\item $\tr \rho'(\Frob_r)=T_r$. Since topologically $\Tm$ is generated
by the $\Frob_r$ this is a tight condition.
\item $\rho'$ is a lift of type $\Sigma$. 
\end{itemize}

To say $\rho'$ is a lift of type $\Sigma$ entails that $\rho'$ is unramified
outside primes $p|\ns$. This is true because $\rho'$ 
is constructed from various $\rho_{f,\lambda}$ with $N(f)|\ns$. 
If $p\neq\ell$ and $p|N(\rho)$ then $p||\ns$. Recall that 
$$\rho|D_p\sim\mtwo{\alpha}{*}{0}{\beta}$$
where $\alpha=\beta\chi$ and $\alpha$ and $\beta$ are unramified. 
For $\rho'$ to be a lift of type $\Sigma$ we require that 
$$\rho'|D_p\sim\mtwo{\tilde{\alpha}}{*}{0}{\tilde{\beta}}$$
where $\tilde{\alpha}$ and $\tilde{\beta}$ are unramified lifts and
$\tilde{\alpha}=\tilde{\beta}\chi$. 
[[I find it mighty odd that $\alpha$ is $\chi$ times an unramified character
and yet $\alpha$ is not ramified! How can that be? Restricted to 
inertia $\beta$ and $\alpha$ would be trivial but $\chi$ would not be.]]
Is this true of $\rho'$? 
Yes since by a theorem of Langlands the factors 
$$\rho_{f,\lambda}|D_p\sim\mtwo{\tilde{\alpha}}{*}{0}{\tilde{\beta}}.$$
[[Ribet said more about this but it does not form a cohesive whole
in my mind. Here is what I have got. Since $\rho_{f,\lambda}$ obviously
ramified at $p$, $p||N(f)|\ns$. $\rho_{f,\lambda}|D_p$ is like an 
elliptic curve with bad multiplicative reduction at $p$.
That $\rho_{f,\lambda}|D_p\sim\abcd{\tilde{\alpha}}{*}{0}{\tilde{\beta}}$
really comes down to Deligne-Rapaport. If write $f=\sum a_n q^n$,
then $a_p\neq 0$ and $\tilde{\beta}(\Frobp)=a_p$, 
$\tilde{\alpha}(\Frobp)=pa_p$. Thus $a_p^2=1$ since 
$\tilde{\alpha}\tilde{\beta}=\chi$. Thus $a_p=\pm 1$ and
$a_p \mod\lambda = \beta(\Frobp)=\pm 1$ independent of $(f,\lambda)$.
So we have these numbers $a_p=a_p(f)=\pm 1$, independent of $\lambda$. ]]

\section{Isomorphism between $\Tm$ and $\rmr$}
Let $\T\subset R=\Z[\ldots,T_n,\ldots]$ be the anemic Hecke algebra
with maximal ideal $\m$. The difference between $\T$ and $R$ is that 
$R$ contains all the Hecke operators whereas $\T$ only contains the
$T_p$ with $p\nd\ell\ns$. Wiles proved that the map
$\Tm\into \rmr$ is an isomorphism. Which Hecke operators are going
to hit the missing $T_p$? If we do the analysis in $\rmr$ we see that 
[[I think for $p\neq \ell$!]]
$$T_p=\begin{cases}
      \pm 1, & \text{for $p|\ns$, $p\not\in\Sigma$}\\
      0, & \text{for $p\in\Sigma$}\end{cases}.$$
This takes care of everything except $T_{\ell}$. 
In proving the surjectivity of $\Tm\into\rmr$ we are quite happy to know
that $T_p=\pm 1$ or $0$. The nontrivial proof 
is given in \cite{ddt}.

Consider the commuting diagram
$$\xymatrix{
{\Tm}\ar@{^(->}[r]\ar[dr] & {\prod\cO_{f,\lambda}}\\
    &{\rmr}\ar[u]
}$$
The map $\rmr\into\prod\cO_{f,\lambda}$ is constructed by massaging
$f$ by stripping away certain Euler factors so as
to obtain an eigenvector for all the Hecke operators. This diagram
forces $\Tm\into\rmr$ to be injective. 

[[Ogus\index{Ogus}: Is it clearly surjective on the residue field? 
  Ribet: Yes.
  Ogus: OK, then we just need to prove it is \`{e}tale.]]

From the theory of the $\theta$ operator we already know two-thirds
of the times that $\T$ contains $T_{\ell}$. 

Suppose $\ell|\ns$. This entails that we are in the ordinary case, 
$\rho$ is not finite at $\ell$, or $\ell\in\Sigma$. 
We did not prove in this situation that
$T_{\ell}\in\Z[\ldots, T_n,\ldots : (n,\ell)=1]$. 

Using generators and relations and brute force one shows that
$\rmr\into\prod\cO_{f,\lambda}$ is an injection. 
Then we can compare everything in $\prod \cO_{f,\lambda}$. 
Now
$$\rholamf|D_{\ell}\sim\mtwo{\tilde{\alpha}}{*}{0}{\tilde{\beta}}$$
and $$\tilde{\beta}(\Frob_{\ell})=T_{\ell}\in\prod\sofl.$$
Using arguments like last time one shows that $\tilde{\beta}(\Frob_{\ell})$
can be expressed in terms of the traces of various operators. This
proves surjectivity in this case. 

Ultimately we have $\Tm\isom\rmr$. 
The virtue of $\Tm$ is that it is generated by traces. The virtue
of $\rmr$ is that it is Gorenstein. We have seen this if $\ell\nd\ns$. 
In fact it is Gorenstein even if $\ell||\ns$. 
[[Ribet: As I stand here today
I do not know how to prove this last assertion in exactly one case.
Ogus\index{Ogus}: You mean there is another gap in Wiles's proof. 
Ribet: No, it is just something I need to work out.]]
When $\ell||\ns$ there are 2 cases. Either $\rho$ is not finite at
$\ell$ or it is. The case when $\rho$ is not finite at $\ell$
was taken care of in \cite{mazur-ribet}.
A proof that $\rmr$ is Gorenstein when $\rho$ is finite at 
$\ell$ ($\ell\in\Sigma$) is not in the literature. 

Now forget $\rmr$ and just think of $\Tm$ in both ways: trace
generated and Gorenstein. 

\section{Deformations}
\index{deformations}
Fix an absolutely irreducible modular mod $\ell$ representation $\rho$
and a finite set of primes $\Sigma$. 
Consider the category $\cC$ of complete local Noetherian
$W(\F)$-algebras $A$ (with $A/\m=\F$). 
Here $\F=\Fln$ and $W(\F)$ is the ring of Witt
vectors, i.e., the ring of integers of an unramified extension of 
$\Ql$ of degree $\nu$. 

Define a functor $\cF:\cC\into\Set$ by sending $A$ in $\cC$
to the set of equivalence classes of lifts 
$$\tilde{\rho}:G\into\GL(2,A)$$
of $\rho$ of type $\Sigma$. The equivalence relation is
that $\tilde{\rho_1}\sim\tilde{\rho_2}$ if and only if there exists
$M\in\GL(2,A)$ with $M\equiv\mtwo{1}{0}{0}{1}\pmod{\m}$ such
that $\tilde{\rho_1}=M^{-1}\tilde{\rho_2}M.$

Mazur proved \cite{mazur:deforming}
that $\cF$ is representable. 
\begin{theorem}
There exists a lift
$$\rhouniv:G\into\GL(2,R_{\Sigma})$$
of type $\Sigma$ such that given any lift 
$\tilde{\rho}:G\into\GL(2,A)$ there
exists a unique homomorphism $\varphi:R_{\Sigma}\into A$ such that
$\varphi\circ\rhouniv\sim\tilde{\rho}$ in the sense of the
above equivalence relation. \end{theorem}

Lenstra\index{Lenstra} figured out how to concretely construct $R_{\Sigma}$. 

Back in the student days of Ribet and Ogus, Schlessinger 
wrote a widely quoted thesis which gives conditions under which
a certain class of functors can be representable. Mazur checks these
conditions in his paper. 

[[Buzzard\index{Buzzard}: What happened to Schlessinger anyways? 
  Ribet: He ended up at University of North Carolina, Chapel Hill.]]

We have constructed
$\tilde{\rho}=\rho':G\into\GL(2,\Tm)$. By the theorem
there exists a unique morphism $\varphi:R_{\Sigma}\into\Tm$
such that $\rho'=\varphi\circ\rhouniv$. 
\begin{theorem} $\varphi$ is an isomorphism thus $\rho'$ is the
universal deformation\index{deformations} and $\Tm$ is the universal deformation ring. 
\end{theorem}
This will imply that any lift of type $\Sigma$ is modular. 

The morphism $\varphi$ is surjective since
$$T_p=\tr\tilde{\rho}(\Frobp)=\tr\varphi\circ\rhouniv(\Frobp)
         =\varphi(\tr(\rhouniv(\Frobp))).$$

We have two very abstractly defined local Noetherian rings. How would you
prove they are isomorphic? Most people would be
terrified by this question. Wiles dealt with it. 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 5/1/96 ribetnotes.tex

\section{Wiles's main conjecture}
\begin{quote}
``We are like a train which is trying to reach Fermat's Last Theorem.
Of course it has not made all of its scheduled stops. But it is on its way.''
\end{quote}

We have a representation $\rho:G\into\GL(2,\F)$. Take $\F=\Fl$ for
our applications today. Then the ring of Witt vectors is
$W(\F)=\Zl$. The Hecke algebra can be embedded as
$$\Tm\subset\prod_{(g,\mu)\in \cA}\cO_{g,\mu}.$$
The Hecke algebra $\Tm$ has the following properties.
\begin{itemize}
\item The index of $\Tm$ in $\prod\cO_{g,\mu}$ is finite.
\item Gorenstein as a $\Zl$-module, i.e., there
exists an isomorphism $\Hom_{\Zl}(\Tm,\Zl)\isom\Tm$.
\item $\Tm$ is generated by the $T_r$ with $r$ prime 
      and $(r,\ell\ns)=1$. 
\end{itemize}

We have constructed a representation
$$\rho':G\into\GL(2,\Tm).$$
Composing appropriately with the map 
$\Tm\hookrightarrow \prod\cO_{g,\mu}$ 
gives a map 
  $$G\into\prod_{(g,\mu)}\GL(2,\cO_{g,\mu}).$$ 
This 
is the product of representations $\prod\rho_{g,\mu}$. 
The triangle is
$$\xymatrix{
G\ar[rr]^{\rho'}\ar[drr]_{\prod\rho_{g,\mu}} && {\GL(2,\Tm)}\ar[d]\\
                && {\prod\GL(2,\cO_{g,\mu})}}$$
Moreover, $\rho'$ is a deformation\index{deformations} of $\rho$ of type
$\Sigma$ so it lifts $\rho$ and satisfies certain
``nice as $\rho$'' properties at primes $p\not\in\Sigma$. 

Let 
$$\rhouniv:G\into\GL(2,\rs)$$
be the universal deformation\index{deformations} of $\rho$ of type $\Sigma$. 
Lenstra\index{Lenstra} gave a very concrete paper \cite{lenstra-smit:explicit} 
constructing
this $\rhouniv$. Before his paper there was only Schlesinger's thesis. 
By the definition of $\rhouniv$ there exists a unique map 
$\varphi:\rs\into\Tm=\T_{\Sigma}$ such that
$\varphi\circ\rhouniv=\rho'$. By $\varphi\circ\rhouniv$ we
mean the composition of $\rhouniv$ with the map
$\GL(2,\rs)\into\GL(2,\Tm)$ induces by $\varphi$.
As noted last time it is easy to see that $\varphi$ is surjective.

\begin{theorem}[Wiles's main `conjecture'] $\varphi$ 
is an isomorphism (for each $\Sigma$).
\end{theorem}
The theorem implies the following useful result. 

\begin{theorem}Suppose $E$ is a 
semistable\index{semistable} elliptic curve over $\Q$ and that for some $\ell>2$ 
the representation $\rho=\rho_{\ell,E}$ on $E[\ell]$
is irreducible and modular. Then $E$ is modular. 
\end{theorem}
\begin{proof}
The representation 
$$\tilde{\rho}=\rho_{\ell^{\infty},E}:G\into\GL(2,\Zl)$$
on the $\ell$-power torsion $E[\ell^{\infty}]=\union E[\ell^n]$ is
a lift of 
$$\rho:G\into\Aut(E[\ell])=\GL(2,\Fl).$$
Furthermore, $\tilde{\rho}$ is a deformation\index{deformations} of $\rho$ of type $\Sigma$. 
Applying universality and using the theorem that 
$\R_{\Sigma}\isom\T_{\Sigma}$ we get a map
$$\T_{\Sigma}\into\Zl: \quad T_r\mapsto 
         a_r=a_r(E)=\Tr \tilde{\rho}(\Frob_r).$$
The relevant diagram is
$$\xymatrix{{\rs}\ar[d]\ar[dr]\\
      {\ts} \ar[r]&{\Zl}}$$
where the map $\rs\into\Zl$ is given by
$$\Tr \rhouniv (\Frob_r)\mapsto a_r.$$
Now the full Hecke algebra $\Z[\ldots,T_n,\ldots]$ embeds
into the completion $\T_{\Sigma}$. Composing this with
the map $\T_{\Sigma}\into\Zl$ above we obtain a map
$$\alpha:\Z[\ldots,T_n,\ldots]\into\Zl.$$ Because of the
duality between the Hecke algebra and modular forms there
exists a modular form $h\in S_2(\Gamma_0(\ns),\Zl)$ 
corresponding to $\alpha$. Since $\alpha$ is a homomorphism
$h$ is a normalized eigenform. Furthermore $a_r(h)=a_r(E)\in\Z$
for all primes $r\nd\ell\ns$. Since almost all coefficients
of $h$ are integral it follows that $h$ is integral. 
Because we know a lot about eigenforms we can massage $h$ to
an eigenform in $S_2(\Gamma_0(N_{E}),\Z)$. 
\end{proof}

[[Some undigested comments follow.]]
\begin{itemize}
\item Once there is any connection between $\rho$ and a modular form
one can prove Taniyama-Shimura in as strong a form as desired.
See the article {\em Number theory as Gadfly}. 
\item Take the abelian variety $A_h$ attached to $h$. 
The $\lambda$-adic representation will have pieces with the
same representations. Using Tate's conjecture we see that $E$
is isogenous to $A_h$. Use at some points Carayol's theorem:
If $g$ is a form giving rising to the abelian variety $A$ then
the conductor of $A$ is the same as the conductor of $g$.
\item Tate proved that if two elliptic curves have isomorphic
$\rho_{\ell^{\infty}}$ for some $\ell$ then they are isogenous. 
\end{itemize}

\section{$\T_{\Sigma}$ is a complete intersection}
\index{complete intersection}

Recall the construction of $\ts=\Tm$. 
Let $\T$ be the anemic Hecke algebra. Then 
$$\T\tensor\Zl\hookrightarrow\prod \cO_{g,\mu}$$
where the product is over a complete set of representatives
(for the action of Galois on eigenforms) 
$g$ and primes $\mu$ lying over $\ell$. 
We found a specific $(f,\lambda)$ for $\Sigma=\emptyset$ such that
$\rholamfbar=\rho$. The maximal ideal $\m$ was defined as follows.
The form $f$ induces a map $\T\into\cO_{f,\lambda}$. Taking the quotient
of $\cO_{f,\lambda}$ by its maximal ideal we obtain a
map $\T\into\Flbar$. Then $\m$ is the kernel of this map. 
The diagram is
$$\xymatrix{
  {\T}\ar[d]\ar[dr]\\
{\cO_{f,\lambda}}\ar[r] & {\Flbar}}$$
The map $\cO_{f,\lambda}\into\Flbar$ is
$$a_r(f)\mapsto\Tr\rho(\Frob_r).$$
To fix ideas we cheat and suppose $\cO_{f,\lambda}=\Zl$. 
[[In Wiles's optic\index{optic} this is OK since he can work this way then
tensor everything at the end.]]

Now $\rholamf$ is a distinguished deformation\index{deformations} of $\rho$ [[``Distinguished''
is not meant in a mathematical sense]]. The map $f$ gives rise to a map
$\ts\into\cO=\Zl$ which we also denote by $f$
$$\xymatrix{
R_{\Sigma}\ar[dr] \ar[r]^{\varphi} & {\ts}\ar[d]^{f} \\
        & {\cO=\Zl}}$$

%Let $\wp_{\T}=\ker f$ and let $\wp_{R} = \ker f\circ\varphi$. 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 5/6/96
\section{The Inequality $\#\cO/\eta\leq\#\wpt/\wpt^2\leq \# \wpr/\wpr^2$}
Let 
   $$\rho:G=\GalQ\into\GL(2,\Fl)$$
be irreducible and modular with $\ell>2$. Let $\Sigma$ be a finite
set of primes. 
We assume there 
is a modular form $f$ of weight 2 with 
coefficients in $\Zl$ which gives rise $\rho$.
Let
$$\rholamf:G\into\GL(2,\Zl)$$
be the representation coming from $f$, then $\rholamf$
reduces to $\rho$ modulo $\ell$. 


Let $\rs$ be the universal deformation\index{deformations} ring, so every deformation
of $\rho$ of type $\Sigma$ factors through $\rs$ in an appropriate sense.
Let $\ts$ be the Hecke ring associated to $\Sigma$. It is a $\Zl$-algebra
which is free of finite rank. Furthermore
$$\ts\subset\prod_{(g,\mu)\in \cA} \cO_{g,\mu}
           =\cO_{f,\mu}\cross \prod_{(g,\mu)\in \cA-\{(f,\mu)\}}\cO_{g,\mu}$$
where $\cA$ is as defined before. 
Define projections $\pr_1$ and $\pr_2$ onto the first and rest of the factors,
respectively
\begin{eqnarray*}
\pr_1&:&\prod_{(g,\mu)\in\cA}\cO_{g,\mu}\into\cO=\cO_{f,\lambda}\\
\pr_2&:&\prod_{(g,\mu)\in\cA}\cO_{g,\mu}\into
         \prod_{(g,\mu)\neq(f,\lambda)}\cO_{g,\mu}
\end{eqnarray*}

Let $\varphi:\rs\into\ts$ be the map coming from the universal
property of $\rs$. This map is surjective. 
The famous triangle which dominates all of the theory is
$$\xymatrix@=3pc{
   {\rs}\ar[dr]\ar[r]^{\varphi}& {\ts}\ar[d]^{\pr_1}\\
      &{\cO=\Zl}}$$

\subsection{The Definitions of the ideals}
We now define two ideals. View $\ts$ as sitting in
the product $\prod \cO_{g,\mu}$. 
\begin{enumerate}
\item The {\em congruence ideal} $\eta\subset\cO$ is
$$\eta := \cO\intersect\ts = \ker \Bigl(\pr_2:\ts\into
                    \prod_{(g,\mu)\neq(f,\lambda)}\cO_{g,\mu}\Bigr)$$
\item The prime ideal $\wpt\subset\ts$ is
$$\wpt = \ker \Bigl(\pr_1:\ts\into\cO\Bigr)$$ 
\end{enumerate}

It is true that
$$\#\cO/\eta \leq \#\wpt/\wpt^2.$$
The condition for equality is a theorem of Wiles.
\begin{theorem}
$\ts$ is a complete intersection\index{complete intersection} if and
only if
$\#\cO/\eta = \#\wpt/\wpt^2.$
\end{theorem}

There is an analogous construction for 
$$\psi=\pr_1\circ\varphi:\rs\into\cO.$$
The diagram is
$$\triCD{\rs}{\varphi}{\ts}{\pr_1}{\cO}{\psi}.$$
Let $\wpr$ be the kernel of $\psi$. From the commutativity
of the above diagram we see that $\psi$ maps $\wpr\onto\wpt$.
Thus we have an induced map $\overline{\psi}$ on ``tangent spaces''
$$\overline{\psi}:\wpr/\wpr^2\onto\wpt/\wpt^2.$$
It follows that
$$\#\cO/\eta\leq\#\wpt/\wpt^2\leq \#\wpr/\wpr^2.$$
There is an analogous theorem.
\begin{theorem} The above inequalities are all equalities iff
\begin{itemize}
\item $\varphi:\rs\into\ts$ is an isomorphism, and
\item $\ts$ is a complete intersection ring.
\end{itemize}
\end{theorem}

\subsection{Aside: Selmer groups}   
Let $M$ be the set of matrices in $M(2,\Ql/\Zl)$ which have
trace $0$. Then $\GL(2,\Zl)$ operates on $M$ by conjugation.
Thus $G$ acts on $M$ via the representation
$\rho':G\into\GL(2,\Zl)$. 
To $\wpr/\wpr^2$ there corresponds the {\em Selmer group} which
is a subgroup of $H^1(\GalQ,M)$.
The subgroup is
$$H^1_{\Sigma}(G,M)=\Hom_{\cO}(\wpr/\wpr^2,\Ql/\Zl)
\subset H^1(\GalQ,M).$$
[[Since Flach's thesis there has been a problem of trying
to get an upper bound for the Selmer group. Wiles
converted it into the above problem.]]

\subsection{Outline of some proofs}
We outline the key steps in the proof that 
$\#\wpr/\wpr^2\leq \#\cO/\eta$. 
\subsubsection{Step 1: $\Sigma=\emptyset$}
The key step is the minimal case when $\Sigma=\emptyset$. 
This is done in \cite{taylor-wiles:fermat}. 
They claim to be proving the apparently weaker statement 
that $\ts$ a complete intersection\index{complete intersection} implies
$$\#\wpt/\wpt^2=\#\cO/\eta.$$
But in Wiles's paper \cite{wiles:fermat} he obtains the inequality
$$\#\wpr/\wpr^2 \leq \frac{(\#\wpt/\wpt^2)^2}{\#\cO/\eta}.$$
Combining these two shows that
$$\#\wpr/\wpr^2\leq \#\cO/\eta.$$
In an appendix to \cite{taylor-wiles:fermat} Faltings proves directly that
$$\#\wpr/\wpr^2\leq\#\cO/\eta.$$

At this point there were some remarks about why Wiles might
have taken a circuitous route in his Annals paper.
Ribet replied,
\begin{quote}
``As Serre says, it is sometimes better to leave out any
psychological behavior related to how people did something
but instead just report on what they did.''
\end{quote}

\subsubsection{Step 2: Passage from $\Sigma=\emptyset$ to $\sigma$ general}
The second step is the induction step in which
we must understand what happens as $\Sigma$ grows. 
Thus $\Sigma$ is replaced by $\Sigma'=\Sigma\union\{q\}$
where $q$ is some prime not in $\Sigma$. 

We will use the following notation. The object attached to 
$\Sigma'$ will be denoted the same way as the object attached
to $\Sigma$ but with a $'$. Thus $(\wpr/\wpr^2)'$ denotes the
Selmer\index{Selmer group} group for $\Sigma'$. 

The change in the Selmer group when $\Sigma$ is replaced 
by $\Sigma'$ is completely governed by some local cohomology group. 
There is a constant $c_q$ such that
$$\#(\wpr/\wpr^2)'\leq c_q\#(\wpr/\wpr^2)\leq c_q\#\cO/\eta.$$
So we just need to know that $$\#\cO/\eta'\geq c_q \#\cO/\eta,$$
i.e., that $\eta'$ is {\em small} as an ideal in $\cO$. 
We need a formula for the ratio of the two orders. 

Let $\T$ be the anemic ring of Hecke operators on
$S_2(\Gamma_0(\ns))$ obtained by adjoining to $\Z$
all the Hecke operators $\T_n$ with $n$ prime to $\ell\ns$.
Let $\T'$ be the anemic Hecke ring of Hecke operators
on $S_2(\Gamma_0(N_{\Sigma'}))$. 

Since $\ns|N_{\Sigma'}$ there is an inclusion 
$$S_2(\Gamma_0(N_{\Sigma}))\hookrightarrow
  S_2(\Gamma_0(N_{\Sigma'})).$$
There is one subtlety, this injection is not equivariant
for all of the Hecke operators. But this is no problem
because $\T$ and $\T'$ are anemic. So 
the inclusion induces a restriction map $r:\T'\into \T$. 

We now introduce a relative version of $\eta$ which
is an ideal $I\subset\T$. 
One way to think of $I$ is as $\T\intersect\T'$ where $\T$
and $\T'$ are both viewed as subrings of $\prod \cO_{g,\mu}$
$$\xymatrix{
*++{\T'}\ar[r]^{r}\ar@{^(->}[d] & *++{\T}\ar@{^(->}[d]\\
*++{\T'_{\m'}}\ar@{^(->}[d] & *++{\Tm}\ar@{^(->}[d]\\
*++{\prod_{(g,\mu)} \cO_{g,\mu}}\ar@{^(->}[r] 
           & {\prod_{\text{more }(g,\mu)} \cO_{g,\mu}}
}$$
The definition Lenstra\index{Lenstra} would give is that
$$I:=r(\Ann_{\T'}(\ker(r))).$$

The amazing formula is
$$\eta'=\eta\cdot f(I)$$
where $f:\T\into\cO$ is the map induced by the modular form $f$. 
[[After introducing this definition Ogus\index{Ogus} was very curious about
how deep it is, in particular, about whether its proof
uses the Gorensteiness of $\T$. Ribet said, ``somehow I do not
think this formula can possibly be profound.'']]

We pause with an aside to consider Wiles's original definition of $\eta$. 
By duality the map $f:\ts\into\Zl$ induces
$$f^{\dual}:\Hom_{\Zl}(\Zl,\Zl)\into\Hom_{\Zl}(\ts,\Zl)\isom\ts.$$
Because $\ts$ is Gorenstein there is an isomorphism 
$\Hom_{\Zl}(\ts,\Zl)\isom\ts$.
Now $f^{\dual}(\id)\in\ts$ so $f(f^{\dual}(\id))\in\cO=\Zl$. Wiles
let $\eta=(f(f^{\dual}(\id)))$ be the ideal generated by
$f(f^{\dual}(\id))$. 

To finish step 2 we must show that $\#\cO/f(I)\geq c_q$, i.e., that
``$I$ is small''. [[I do not see how this actually finishes step
2, but it is reasonable that it should. How does this index relate
to the index of $f(I)\eta$ in $\cO$?]]

Let $J=J_0(\ns)$ and $J'=J_0(N_{\Sigma'})$. Since 
$$S_2(\Gamma_0(\ns))\hookrightarrow S_2(\Gamma_0(N_{\Sigma'}))$$
functoriality of the Jacobian\index{Jacobian} induces a map $J\hookrightarrow J'$. 
By autoduality we also obtain an injection $J^{\dual}\hookrightarrow J'$
and $J\intersect J^{\dual}$ is a finite subgroup of $J'$. 
[[I definitely do not understand why $J$ is not just equal to
$J^{\perp}$. Where does the other
embedding $J^{\perp}\hookrightarrow J'$ come from?]]

It can be seen that $J\intersect J^{\dual}=J[\delta]$ for
some $\delta\in\T$. It turns out that
$$\Ann_{\T}(J\intersect J^{\dual})=\T\intersect\delta\End(J)
                          \supseteq\delta\T.$$
It is an observable fact that
$f(\delta\T)$ is an ideal of $\cO$ of norm $c_q$. 
The {\em heart} of the whole matter is to see that the inclusion
$$\delta\T\subseteq\T\intersect\delta\End(J)$$
is an equality after localization at $\m$. To do this we
have to know that
$\Tate_{\m}(J)\isom\Tm^2$. This is equivalent to the Gorenstein
business. With this in hand one can just check this equality. 

Unfortunately, it is the spring of 1996 and we are now 
10 minutes past when the course should end. 
Realizing this, Ken brings the course to a close. 
In the grand Berkeley tradition, the room fills 
with applause.
\chapter{Computing with Modular Forms and Abelian Varieties}
% 389.tex
\chapter{The Modular Curve $X_0(389)$}

Let $N$ be a positive integer, and let $X_0(N)$ be the compactified
coarse moduli space that classifies pairs $(E,C)$ where $E$ is an
elliptic curve and $C$ is a cyclic subgroup of order~$N$.  The space 
$X_0(N)$ has a canonical structure of algebraic curve over~$\Q$, and
its properties have been very well studied during the last forty years.
For example, Breuil, Conrad, Diamond, Taylor, and Wiles proved that
every elliptic curve over~$\Q$ is a quotient of some $X_0(N)$.

The smallest~$N$ such that the Jacobian of $X_0(N)$ has positive
Mordell-Weil rank is~$37$, and Zagier studied the genus-two curve
$X_0(37)$ in depth in his paper~\cite{zagier:modular}.  From this
viewpoint, the next modular curve deserving intensive investigation is
$X_0(389)$, which is the first modular curve whose Jacobian has
Mordell-Weil rank larger than that predicted by the signs in the
functional equations of the $L$-series attached to simple factors of
its Jacobian; in fact, $389$ is the smallest conductor of an elliptic
curve with Mordell-Weil rank~$2$.  Note that $389$ is prime and
$X_0(389)$ has genus $g=32$, which is much larger than the genus~$2$
of $X_0(37)$, which makes explicit investigation more challenging.

Work of Kolyvagin \cite{kolyvagin:weil, kolyvagin:subclass} and
Gross-Zagier \cite{gross-zagier} has completely resolved the rank
assertion of the Birch and Swinnerton-Dyer conjecture (see, e.g.,
\cite{tate:bsd}) for elliptic curves~$E$ with $\ord_{s=1} L(E,s) \leq
1$.  The lowest-conductor elliptic curve~$E$ that doesn't submit to
the work of Kolyvagin and Gross-Zagier is the elliptic curve~$E$ of
conductor~$389$ mentioned in the previous paragraph.  At present we
don't even have a conjectural natural construction of a finite-index
subgroup of $E(\Q)$ analogous to that given by Gross and Zagier for
rank~$1$ (but see Mazur's work on universal norms, which might be used
to construct $E(\Q)\tensor\Z_p$ for some auxiliary prime~$p$).  

Inspired by the above observations, and with an eye towards providing
helpful data for anyone trying to generalize the work of Gross,
Zagier, and Kolyvagin, in this paper we compute everything we can
about the modular curve $X_0(389)$.  Some of the computations of this
paper have already proved important in several other papers: the
discriminant of the Hecke algebra attached to $X_0(389)$ plays a roll
in \cite{ribet:torsion}, the verification of condition 3 in
\cite{merel-stein}, and the remark after Theorem~1 of
\cite{gordon-ono:vis}; also, the arithmetic of $J_0(389)$ provides a
key example in \cite[\S4.2]{agashe-stein:visibility}.  Finally, this
paper serves as an entry in an ``encyclopaedia, atlas or hiker's
guide to modular curves'', in the spirit of N.~Elkies 
(see \cite[pg.~22]{elkies:ffield}).

We hilight several surprising ``firsts'' that occur at level~$389$.
The discriminant of the Hecke algebra attached to $S_2(\Gamma_0(389))$
has the apparently unusual property that it is divisible by~$p=389$
(see Section~\ref{sec:disc_div}).  Also $N=389$ is the smallest integer such
that the order of vanishing of $L(J_0(N),s)$ at $s=1$ is larger than
predicted by the functional equations of eigenforms (see Section~\ref{sec:mwranks}).  
The author conjectures that $N=389$ is the smallest 
level such that an optimal newform factor of $J_0(N)$ 
appears to have Shafarevich-Tate group with nontrivial odd 
part (see Section~\ref{sec:sha}). 
Atkin conjectures that $389$ is the largest prime such that 
the cusp of $X_0^+(389)$ fails to be a  
Weierstrass point (see Section~\ref{sec:atkin}).

\section{Factors of $J_0(389)$}
To each newform $f\in S_2(\Gamma_0(389))$, Shimura \cite{shimura:factors} 
associated a quotient $A_f$ of $J_0(389)$, and
$J_0(389)$ is isogeneous to the  product $\prod A_f$, 
where the product runs over the $\Gal(\Qbar/\Q)$-conjugacy classes of newforms.
Moreover, because $389$ is prime each factor $A_f$ cannot be decomposed further
up to isogeny, even over $\Qbar$ (see \cite{ribet:endo}).

\subsection{Newforms of level $389$}
There are five $\Gal(\Qbar/\Q)$-conjugacy classes of newforms in $S_2(\Gamma_0(389))$.
The first class corresponds to the unique elliptic curve of conductor $389$, and its
$q$-exansion begins
$$
  f_1 = q - {2}q^{2} - {2}q^{3} + {2}q^{4} - {3}q^{5} + {4}q^{6} - {5}q^{7} + q^{9} + {6}q^{10} + \cdots.
$$
The second has coefficients in the quadratic field $\Q(\sqrt{2})$, and has $q$-expansion
$$
  f_2 = q + {\sqrt{2}}q^{2}+({\sqrt{2} - {2}})q^{3} - q^{5}+({{-2}\sqrt{2} + {2}})q^{6}+ \cdots.
$$   
The third has coefficients in the cubic field generated by a root $\alpha$ of 
$x^3-4x-2$:
$$
  f_3 = q + {\alpha}q^{2} - {\alpha}q^{3}+({\alpha^{2} - {2}})q^{4}+({-\alpha^{2} + 1})q^{5} - {\alpha^{2}}q^{6} +\cdots.
$$
The fourth has coefficients that generate the degree-six field defined by 
a root $\beta$ of $x^6+3x^5-2x^4-8x^3+2x^2+4x-1$ and $q$-expansion
$$
  f_4 = q + {\beta}q^{2}+({\beta^{5} + {3}\beta^{4} - {2}\beta^{3} - {8}\beta^{2} + \beta + {2}})q^{3}+\cdots.
$$
The fifth and final newform (up to conjugacy) has coefficients that generate
the degree $20$ field defined by a root of 
\begin{eqnarray*}
f_5 &=& x^{20} - 3x^{19} - 29x^{18} + 91x^{17} + 338x^{16} - 1130x^{15} - 2023x^{14} + 7432x^{13} \\
&& + 6558x^{12} - 28021x^{11} - 10909x^{10} + 61267x^{9} + 6954x^8 - 74752x^7   \\
&& + 1407x^6+ 46330x^5 - 1087x^4 - 12558x^3 - 942x^2 + 960x + 148.
\end{eqnarray*}

\subsubsection{Congruences}
The vertices in Figure~\ref{fig:cong} correspond to the newforms $f_i$; there is an edge between
$f_i$ and $f_j$ labeled~$p$ if there is a maximal ideal $\wp\mid p$ of the field generated
by the Fourier coefficients of $f_i$ and $f_j$ such that $f_i \con f_j \pmod{\wp}$.
\begin{figure}
\begin{center}
\psfrag{f1}{$f_1$}
\psfrag{f2}{$f_2$}
\psfrag{f3}{$f_3$}
\psfrag{f4}{$f_4$}
\psfrag{f5}{$f_5$}
\psfrag{2          }{$2$}
\psfrag{2       }{$2$}
\psfrag{2,5}{$2,5$}
\psfrag{3         }{$3$}
\psfrag{31}{$31$}
\psfrag{2}{$2$}
\psfrag{2         }{$2$}
\psfrag{2           }{$2$}
\psfrag{2       }{$2$}
\includegraphics{graphics/389/cong}
\caption{Congruences Between Newforms\label{fig:cong}}
\end{center}
\end{figure}


\comment{
> D := SortDecomposition(NewformDecomposition(CuspidalSubspace(ModularSymbols(389,2))));
  S := CuspidalSubspace(ModularForms(389,2));
  f := [* *]; for i in [1..5] do Append(~f,Newform(S,i)); end for;
  for i in [1..5] do 
    for j in [i+1..5] do 
       F := Factorization(#CongruenceGroup(Parent(f[i]),Parent(f[j]),200));
       if #F gt 0 then
          printf "%o--%o [label=\"", i,j; 
          for i in [1..#F] do 
             printf "%o",F[i][1]; 
             if i lt #F then
                printf ","; 
             end if;
          end for;
          printf "\"];\n";
      end if;
    end for;
  end for;


shell-> ps2epsi cong.ps cong.epsi

}

\subsection{Isogeny structure}
We deduce from the above determination of the newforms in $S_2(\Gamma_0(389))$ 
that $J_0(389)$ is $\Q$-isogenous to a product of $\Qbar$-simple abelian varieties
$$
  J \sim A_1\cross A_2 \cross A_3 \cross A_4 \cross A_{5}.
$$ 

View the duals $A_i^{\vee}$ of the $A_i$ as abelian subvarieties of $J_0(389)$.
Using modular symbols as in \cite[\S3.4]{agashe-stein:bsd}
we find that, for $i\neq j$, a prime~$p$ 
divides $\#(A_i^{\vee}\intersect A_j^{\vee})$ if and only if $f_i\con f_j\pmod{\wp}$
for some prime $\wp\mid p$ (recall that the congruence primes 
are given in Figure~\ref{fig:cong} above).


\subsection{Mordell-Weil ranks}\label{sec:mwranks}
Suppose $f\in S_2(\Gamma_0(N))$ is a newform of some level~$N$. 
The functional equation for $L(f,s)$ implies that $\ord_{s=1}L(f,s)$ 
is odd if and only if the sign of the eigenvalue of the Atkin-Lehner
involution $W_N$ on~$f$ is $+1$.  
\begin{proposition}\label{prop:minanrank}
If $f\in S_2(\Gamma_0(N))$ is a newform of level $N<389$, then
$\ord_{s=1}L(f,s)$ is either$0$ or~$1$.
\end{proposition}
\begin{proof}
The proof amounts to a large computation, which divides into two parts:
\begin{enumerate}
\item Verify, for each newform~$f$ of level $N<389$ such that 
$W_N(f) = -f$, that $L(f,1) = *\int_{0}^{i\infty} f(z) dz$ (for some nonzero $*$)
is nonzero.  This is a purely algebraic computation involving modular symbols.
\item Verify, for each newform~$f$ of level $N<389$ such that 
$W_N(f) = f$, that $L'(f,1)\neq 0$ (see \cite[\S4.1]{empirical}, 
which points to \cite[\S2.11,\S2.13]{cremona:algs}). 
We do this by approximating an infinite
series that converges to $L'(f,1)$ and noting that the value we 
get is far from~$0$.
\end{enumerate}
\end{proof}

Thus $N=389$ is the smallest level such that the $L$-series of
some factor $A_f$ of $J_0(N)$ has order of vanishing higher than
that which is forced by the sign in the functional equation.

%The elliptic curve~$A_1$ of rank~$2$ is the lowest-conductor elliptic 
%curve having rank~$>1$, because every elliptic curve over~$\Q$ is modular 
%\cite{breuil-conrad-diamond-taylor},  and \cite{cremona:algs} doesn't contain 
%any elliptic curve of conductor $<389$ having rank~$>1$.  

%The $L$-function corresponding to~$A_{5}$ does not vanish at $s=1$, 
%so $A_{5}$ has analytic rank~$0$, and hence algebraic rank~$0$, by
%the theorem of Kolyvagin and Logachev.  

%The genus of $X^+=X/w_{389}$ is $g^{+} =11$, and $J_0(389)^{-}$ 
%is isogeneous to $A_{1} \cross A_{5}.$

\begin{proposition}\label{prop:anrank}
The following table summarizes the dimensions and Mordell-Weil ranks 
(over the image of the Hecke ring) of the newform factors of $J_0(N)$:
\begin{center}
\begin{tabular}{|l|c|c|c|c|c|}\hline
\text{\rm }& $A_1$ & $A_2$ & $A_3$ & $A_4$ & $A_{5}$\\\hline
\text{\rm Dimension}& $1$ & $2$ & $3$ & $6$ & $20$\\\hline
\text{\rm Rank} & $2$ & $1$ & $1$ & $1$ & $0$\\\hline
\end{tabular}
\end{center}
\end{proposition}
\begin{proof}
The elliptic curve $A_1$ is $389A$ in Cremona's tables, which is
the elliptic curve of smallest conductor having rank $2$. 
For $A_{5}$ we directly compute whether or not the $L$-function
vanishes using modular symbols, by taking an inner product with
the winding element $e_w=-\{0,\infty\}$.  We find that the $L$-function
does not vanish.  By Kolyvagin-Logachev, it follows that $A_{5}$ has
Mordell-Weil rank $0$. 

For each of the other three factors, the sign of the functional
equation is odd, so the analytic ranks are odd.  
As in the proof of Proposition~\ref{prop:minanrank}, 
we verify that the analytic rank is~$1$ in each case.  By work of 
Gross, Zagier, and Kolyvagin it follows that the ranks are~$1$.
\end{proof}

%The elliptic curve $A_1$ has minimal Weierstrass model
%             $$y^2+y=x^3+x^2-2x.$$
%It satisfies $A_1(\Q)=\Z\oplus \Z$. The modular
%degree is $40$.

\comment{\subsection{Characteristic polynomials}
The characteristic polynomials of the first two Hecke operators are
as follows:
\begin{eqnarray*}
T_2&=&(x + 2)({x^{2} - {2}})({x^{3} - {4}x - {2}})(x^{6} + {3}x^{5} - {2}x^{4} - {8}x^{3} + {2}x^{2} + {4}x - 1)\\
 &&(x^{20} - {3}x^{19} - {29}x^{18} + {91}x^{17} + {338}x^{16} - {1130}x^{15} - {2023}x^{14}+ {7432}x^{13}+ {6558}x^{12}\\
 &&- {28021}x^{11} - {10909}x^{10} + {61267}x^{9} + {6954}x^{8}- {74752}x^{7} + {1407}x^{6} + {46330}x^{5}\\ 
 && - {1087}x^{4} - {12558}x^{3} - {942}x^{2} + {960}x + {148})\\
T_3&=&(x + 2)(x^2 + 4x + 2)(x^3 -4x + 2)(x^6 + 5x^5 + 4x^4 -13x^3 -21x^2 -6x + 1)\\
 &&(x^{20} -11x^{19} + 19x^{18} + 204x^{17} -845x^{16} -781x^{15} + 8883x^{14} -6177x^{13} -40916x^{12}\\
 &&+ 63058x^{11} + 85034x^{10} -215618x^9 -46920x^8 + 342529x^7 -84612x^6 -241030x^5 \\
 &&+ 112365x^4 + 51018x^3 -28526x^2 + 3560x -100)
\end{eqnarray*}
}


\section{The Hecke algebra}\label{sec:hecke_algebra}
\subsection{The Discriminant is divisible by $p$}
\label{sec:disc_div}
Let $N$ be a positive integer.  
The Hecke algebra $\T\subset\End(S_2(\Gamma_0(N)))$ is
the subring generated by all Hecke operators $T_n$ for $n=1,2,3,\ldots$.
We are concerned with the {\em discriminant} of the 
trace pairing $(t,s)\mapsto \Tr(ts)$.

When~$N$ is prime, $\T_\Q=\T\tensor_\Z\Q$ is a product
$K_1\cross\cdots\cross K_n$ of  totally real number fields.  
Let $\tilde{\T}$ denote the integral closure of~$\T$ in $\T_\Q$;
note that $\tilde{\T}=\prod \O_i$ where~$\O_i$ is the ring 
of integers of $K_i$. 
Then $\disc(\T)=[\tilde{\T}:\T]\cdot \prod_{i=1}^n\disc(K_i)$.
%One can view the primes dividing $\prod_{i=1}^n\disc(K_i)$ as being
%associated to singularities of the irreducible components of $\Spec(\T)$, 
%and the primes dividing $[\tilde{\T}:\T]$ are associated to intersections 
%of irreducible components, or, equivalently, congruences between eigenforms.

\begin{proposition}
The discriminant of the Hecke algebra associated to 
$S_2(\Gamma_0(389))$ is  
$$
  2^{53}\cdot{}3^4\cdot{}5^6\cdot{}31^2\cdot{}37\cdot{}389
  \cdot{}3881\cdot{}215517113148241\cdot{}477439237737571441.
$$
\end{proposition}
\begin{proof}
By \cite{agashe-stein:schoof-appendix}, the Hecke algebra~$\T$
is generated as a $\Z$-module by $T_1,T_2,\ldots T_{65}$. 
%Then $\disc(\T)$ can be quickly computed once one finds 
%a $\Z$-basis for~$\T$, which can be accomplished as follows.
To compute $\disc(\T)$, we proceed as follows.
First, compute the space $\sS_2(\Gamma_0(389))$ of 
cuspidal modular symbols, which is a faithful $\T$-module.
Choose a random element $x\in \sS_2(\Gamma_0(389))_+$ of the $+1$-quotient
of the cuspidal modular symbols, then compute the
images $v_1=T_1(x), v_2=T_2(x), \ldots, v_{65}=T_{65}(x)$.  If these don't span
a space of dimension $32=\rank_\Z \T$ choose a new random element~$x$
and repeat.  Using the Hermite Normal Form, find a $\Z$-basis $b_1,\ldots, b_{32}$ for 
the $\Z$-span of $v_1,\ldots, v_{65}$.   The trace pairing on $\T$ induces a trace
pairing on the $v_i$, and hence on the $b_i$.  Then $\disc(\T)$ is the discriminant
of this pairing on the $b_i$.   The reason we embed $\T$ in $\sS_2(\Gamma_0(389))_+$ 
as $\T{}x$ is because directly finding a $\Z$-basis for $\T$ would involve computing
the Hermite Norm Form of a list of $65$ vectors in a $1024$-dimensional space, which
is unnecessarily difficult (though possible).
\end{proof}



We compute this discriminant by applying the definition of 
discriminant to a matrix representation of the first~$65$ Hecke 
operators $T_1,\ldots, T_{65}$.  Matrices representing these
Hecke operators were computed using the modular symbols algorithms
described in \cite{cremona:algs}.
[Sturm, {\em On the congruence of modular forms}].
%\end{proof}

%It might be possible to choose a 
%bound smaller than~$65$ by directly considering a basis of
%modular forms.  
%\comment{  A \pari{} program which can usually compute the discriminant
%of a commutative $\Z$-module represented by matrices is included as an 
%appendix. }

\comment{
We should also note that by computing successive greatest common divisors of 
discriminants of characteristic polynomials of Hecke operators $T_p$, one
can get a fairly good multiplicative upper bound on the discriminant.  
If $D$ is the bound computed by computing successive greatest common divisors of 
discriminants of characteristic polynomials of Hecke operators $T_p$, until the
gcd stabilized $15$ times in a row, then $D$ is $2^{10}$ times the correct
discriminant (in the case $N=389$, of course).}


In the case of $X_0(389)$,
$\T\tensor \Q = K_1\cross K_2\cross K_3\cross K_6\cross K_{20},$
where~$K_d$ has degree~$d$ over~$\Q$.
We have
\begin{eqnarray*}
K_1&=&\Q, \\
K_2&=&\Q(\sqrt{2})\\
K_3&=&\Q(\beta) , \quad \beta^3-4\beta-2=0,\\
K_6&=&\Q(\gamma), 
      \quad \gamma^6+3\gamma^5-2\gamma^4-8\gamma^3+2\gamma^2+4\gamma-1=0,\\
K_{20}&=&\Q(\delta), \quad \delta^{20}-3\delta^{19}-29\delta^{18}+91\delta^{17}+338\delta^{16}-1130\delta^{15}-2023\delta^{14}+7432\delta^{13}\\
    &&\qquad +6558\delta^{12}-28021\delta^{11}-10909\delta^{10}+61267\delta^9 +6954\delta^8-74752\delta^7\\
    &&\qquad +1407\delta^6+46330\delta^5
-1087\delta^4-12558\delta^3-942\delta^2+960\delta+148=0.
\end{eqnarray*}

\comment{Note that the given generators of these fields are the eigenvalues
$a_2$ of the corresponding eigenforms.}

The discriminants of the $K_i$ are
\begin{center}
\begin{tabular}{|c|c|c|c|}\hline
    $K_1$ & $K_2$ & $K_3$ & $K_6$ \\\hline
 1 & $2^3$  & $\quad 2^2\cdot 37$ & $\quad 5^3\cdot 3881$ \\\hline
\end{tabular}
\end{center}
and 
$$
  \disc(K_{20}) =  2^{14}\cdot 5\cdot 389 \cdot 215517113148241\cdot 477439237737571441.
$$
Observe that the discriminant of $K_{20}$ is divisible by~$389$.
The product of the discriminants is
$$2^{19}\cdot 5^4\cdot 37\cdot 389\cdot 3881\cdot 215517113148241\cdot
    477439237737571441.$$
This differs from the exact discriminant by a factor
of $2^{34}\cdot 3^4\cdot 5^2\cdot 31^2$, so 
the index of $\T$ in its normalization is 
$$[\tilde{\T}:\T]=2^{17}\cdot 3^2\cdot 5\cdot 31.$$
Notice that $389$ does not divide this index, and that $389$ is not
a ``congruence prime'', so~$389$ does not divide any
modular degrees.  

\begin{question}
Is there a newform optimal quotient $A_f$ of $J_0(p)$ 
such that~$p$ divides the modular degree of $A_f$?
(No, if $p<14000$.)
\end{question}

\comment{% this is wrong since the Hecke algebra doesn't split as a product!
Away from the primes $211$ and $65011$, $a_2$ actually generates the
ring $\Z(f_{20})=\Z[a_1,a_2,\ldots]$ generated by the Fourier
coefficients of one of the degree $20$ eigenforms. The discriminant 
of the order generated by $a_2$ divided by the discriminant of the
maximal order in $K_{20}$ is $2^{44}\cdot 5^2\cdot 211^2\cdot 65011^2$. 
Thus the discriminant of $\T$ must be divisible by 
$$2^{63}\cdot 5^6\cdot 37\cdot 389\cdot 3881\cdot 215517113148241\cdot
    477439237737571441.$$
}

\subsection{Congruences primes in $S_{p+1}(\Gamma_0(1))$}
K.~Ono asked the following question, in connection with
Theorem~1 of~\cite{gordon-ono:vis}.
\begin{question}
Let~$p$ be a prime.  Is~$p$ ever a congruence prime on $S_{p+1}(\Gamma_0(1))$?
More precisely, if~$K$ is the number field generated by all the
eigenforms of weight $p+1$ on $\Gamma_0(1)$, can there be a prime 
ideal~$\wp\mid p$ for which
$
f \con g \pmod{\wp}
$
for distinct eigenforms $f, g \in S_{p+1}(\Gamma_0(1))$?
\end{question}

The answer is ``yes''.  
There is a standard relationship between
$S_{p+1}(\Gamma_0(1))$ and $S_2(\Gamma_0(p))$.  As noted 
in Section~\ref{sec:disc_div},  $p=389$ is a 
congruence prime for $S_2(\Gamma_0(389))$, so we investigate 
$S_{389+1}(\Gamma_0(1))$.

\begin{proposition}
There exist distinct newforms $f, g\in S_{389+1}(\Gamma_0(1))$
and a prime $\wp$ of residue characteristic $389$ such that
$f\con g \pmod{\wp}$.
\end{proposition}
\begin{proof}
We compute the characteristic polynomial~$f$ of the Hecke operator $T_2$ 
on $S_{389+1}(\Gamma_0(1))$ using nothing 
more than \cite[Ch.~VII]{serre:arithmetic}. 
We find that~$f$ factors modulo $389$ as follows:
\begin{eqnarray*}
\fbar&=&(x + 2)(x + 56)(x + 135)(x + 158)(x + 175)^2(x + 315)(x + 342)(x^2 + 387)\\
&&(x^2 + 97x + 164)(x^2 + 231x + 64)(x^2 + 286x + 63)\\
&&(x^5 + 88x^4 + 196x^3 + 113x^2 + 168x + 349)\\
&&(x^{11} + 276x^{10} + 182x^9 + 13x^8 + 298x^7 + 316x^6 + 213x^5 \\
&&\qquad+ 248x^4 + 108x^3 + 283x^2 + x + 101)
\end{eqnarray*}
Moreover,~$f$ is irreducible and $389\mid\mid \disc(f)$, so 
the square factor $(x+175)^2$ implies that~$389$ 
is ramified in the degree-$32$ field $L$ generated by a single root of $f$.  
Thus there are exactly $31$ distinct homomorphisms from the ring of integers of $L$ to
$\Fbar_{389}$.  That is, there are exactly $31$ ways to reduce the $q$-expansion of a 
newform in $S_{390}(\Gamma_0(1))$ to obtain a
$q$-expansion in $\Fbar_{389}[[q]]$. 
Let~$K$ be the field generated by all eigenvalues of the $32$ 
newforms $g_1, \ldots g_{32} \in S_{390}(\Gamma_0(1))$, and let $\wp$
be a prime of $\O_K$ lying over $389$.  
Then the subset 
$\{g_1 \pmod{\wp}, g_2 \pmod{\wp}, \ldots, g_{32}\pmod{\wp}\}$ 
of $\Fbar_{389}[[q]]$ has cardinality at most $31$, so
there exists $i \neq j$ such that 
$g_i \con g_j \pmod{\wp}$.
\end{proof}


\section{Supersingular points in characteristic $389$}
\subsection{The Supersingular $j$-invariants in characteristic $389$}
Let $\alpha$ be a root of $\alpha^2+95\alpha+20$.  Then the
$33=g(X_0(389))+1$ supersingular $j$-invariants in $\F_{389^2}$ are
$$
\begin{array}{l}
0, 7, 16, 17, 36, 121, 154, 220, 318, 327, 358, 60\alpha + 22, 68\alpha + 166, 80\alpha + 91, 86\alpha + 273, \\
93\alpha + 333, 123\alpha + 350, 123\alpha + 375, 129\alpha + 247, 131\alpha + 151, 160\alpha + 321, 176\alpha + 188,\\
213\alpha + 195, 229\alpha + 292, 258\alpha + 154, 260\alpha + 51, 266\alpha + 335,  266\alpha + 360, 296\alpha + 56, \\
303\alpha + 272, 309\alpha + 271, 321\alpha + 319, 329\alpha + 157.
\end{array}
$$

\section{Miscellaneous}

\subsection{The Shafarevich-Tate group}\label{sec:sha}
Using visibility theory \cite[\S4.2]{agashe-stein:visibility},
one sees that $\#\Sha(A_5)$ is divisible by an odd prime, because
$$
 (\Z/5\Z)^2 \ncisom A_1(\Q)/5 A_1(\Q) \subset \Sha(A_{5}).
$$
Additional computations suggest the following conjecture.
\begin{conjecture}
$N=389$ is the smallest level such that there is an optimal newform 
quotient $A_f$ of $J_0(N)$ with $\#\Sha(A_f)$ 
divisible by an odd prime.  
\end{conjecture}


\subsection{Weierstrass points on $X_0^+(p)$}\label{sec:atkin}
Oliver Atkin has conjectured that $389$ is the largest prime such that 
the cusp on $X_0^+(389)$ fails to be a Weierstrass point.  He verified
that the cusp of $X_0^+(389)$ is not a Weierstrass point but
that the cusp of $X_0^+(p)$ is a Weierstrass point for all primes~$p$
such that $389<p\leq 883$ (see, e.g., \cite[pg.39]{elkies:ffield}).
In addition, the author has extended the verification of Atkin's conjecture
for all primes $<3000$.    Explicitly, this involves computing a reduced-echelon
basis for the subspace of $S_2(\Gamma_0(p))$ where the Atkin-Lehner involution 
$W_p$ acts as $+1$, and comparing the largest valuation of an element of this
basis with the dimension of the subspace.  These numbers differ exactly when
the cusp is a Weierstrass point.


\comment{
function IsWP(p)
   M := CuspidalSubspace(ModularSymbols(p,2,+1));
   W := AtkinLehnerSubspace(M,p,+1);
   d := Dimension(W);
   Q := qExpansionBasis(W,d+5);
   return Coefficient(Q[#Q],d) eq 0;
end function;
}

\subsection{A Property of the plus part of the integral homology}
For any positive integer~$N$, let $H^+(N) = H_1(X_0(N),\Z)^+$ be the
$+1$ eigen-submodule for the action of complex conjugation on the
integral homology of $X_0(N)$.  Then $H^+(N)$ is a module over the
Hecke algebra~$\T$.  Let 
$$
 F^+(N) = \coker\left(H^+(N) \cross \Hom(H^+(N),\Z) \ra \Hom(\T,\Z)\right)
$$
where the map sends $(x,\vphi)$ to the homomorphism
$t\mapsto \vphi(tx)$.  Then $\#F^+(p)\in \{1,2,4\}$ for
all primes $p<389$, but $\#F^+(389) = 8$.

\subsection{The Field generated by points of 
   small prime order on an elliptic curve}
The prime $389$ arises in a key way in the verification of condition~3
in \cite{merel-stein}.



\bibliography{biblio}
%\printindex

\end{document}
